Hello Guest it is April 18, 2024, 11:50:19 PM

Author Topic: Wait until external application ends...  (Read 2440 times)

0 Members and 1 Guest are viewing this topic.

Wait until external application ends...
« on: November 12, 2010, 04:51:54 AM »
I'm using a button to call an external application:
Shell ("c:\myapplication.exe")

Inside the same button i want to load a file after "myapplication" file is closed.
LoadFile("c:\myfile.txt") 

So, i need something like "~wait for myapplication to close" between these commands:
Shell ("c:\myapplication.exe")
"Wait for myapplication to close"
LoadFile("c:\myfile.txt")

How can i do that?

Re: Wait until external application ends...
« Reply #1 on: November 20, 2010, 12:15:15 PM »
The problem was solved as following:

I created a button which has VB script:
LoadFile("c:\myfile.txt")
While IsLoading()
Sleep 100
Wend


This button has enabled a HOTKEY (for example key "0").
So when my application finishes, focuses on Mach application
and sends a keystroke "0" (the HotKey).

2-3 days of searching and i didn't find any other solution.
Still if you have any idea of controlling it through Mach,
please share.

Giannis