Pause while shell running

Are there any way i can make Navision make a pause and wait for a value to be sat in a external program while using shell inside Navision? Now it just starts the exe file i call on using the shell and completes the rest of the navision code before the exe file is done with the work it’s supposed to do. Like a runmodal or something in the shell parameter? [?][?][?][?][?] [?] [?] [?] [?] [?] [?]

From the C/SIDE Reference Guide (= help) SHELL Use this function to execute external programs and operating system commands from C/AL programs. You can run this function modally or non-modally, depending on whether or not you include the return value from the external program in your code. [ReturnCode]:= SHELL(Name [, Param, …])