| View previous topic :: View next topic |
| Author |
Message |
TestPilot
Joined: 26 Jun 2007 Posts: 46
|
Posted: Mon Jul 30, 2007 3:20 am Post subject: Starting software from within macro |
|
|
I need to start DSpeech if it not already started from macro. How can I do that? This is my current code - it is not working
| Code: |
IfWinExist DSpeech (By Dimio)
{
WinActivate
}
else
{
Run %comspec% /c "D:\Program Files\DSpeech\DSpeech.exe"
WinWait DSpeech (By Dimio)
WinActivate
}
|
"D:\Program Files\DSpeech\DSpeech.exe" is a correct path.
If DSpeech has been lunched - macro works perfectly. Otherwise it is looping waiting for me to start DSpeech manually and after that activate DSpeech window and execute happily 
Last edited by TestPilot on Mon Jul 30, 2007 3:31 am; edited 1 time in total |
|
| Back to top |
|
 |
mwharri
Joined: 15 Mar 2007 Posts: 70
|
Posted: Mon Jul 30, 2007 3:30 am Post subject: |
|
|
Do you have to open the command line first?
I'm not really sure, but I think you can change your Run command to this:
| Code: |
Run "D:\Program Files\DSpeech\DSpeech.exe"
|
and it will work.
Hope this helps. |
|
| Back to top |
|
 |
TestPilot
Joined: 26 Jun 2007 Posts: 46
|
Posted: Mon Jul 30, 2007 3:43 am Post subject: |
|
|
Thank you mwharri for reply!
Problem fixed, everything is working now!
There was stupid "winwait DSpeech" line just before code I cited above - somehow was not seeing it. |
|
| Back to top |
|
 |
|