Results 1 to 3 of 3

Thread: using os_shellexecute

  1. #1

    using os_shellexecute

    Is there a way to have os_shellexecute wait until the control returns before the script continues?

    I need it to launch a second script and then wait until the script is finishes and closes.

    Thanks
    Sandy

  2. #2

    Re: using os_shellexecute

    Hi Sandy,

    sorry but isn't possible using the OS_ShellExecute().
    May be you should try to use the OS_Shell() function http://www.thinbasic.com/public/prod...tml/index.html with the %OS_SHELL_SYNC mode.

    Ciao,
    Roberto
    http://www.thinbasic.com

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: using os_shellexecute

    Hi Sandy,

    maybe better to use OS_SHELL in this case, like in following:
    [code=thinbasic]
    OS_Shell("notepad.exe myFile.txt", %OS_WNDSTYLE_NORMAL, %OS_SHELL_SYNC )
    [/code]

    Last equate says we want to run in synchronuously, so script will wait for end of launched process.


    Petr

    EDIT: Roberto was faster
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Similar Threads

  1. Capturing OS_ShellExecute Output?
    By mhillmer in forum Console
    Replies: 4
    Last Post: 13-09-2007, 17:34

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •