AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Starting software from within macro

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Mon Jul 30, 2007 3:20 am    Post subject: Starting software from within macro Reply with quote

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 Evil or Very Mad


Last edited by TestPilot on Mon Jul 30, 2007 3:31 am; edited 1 time in total
Back to top
View user's profile Send private message
mwharri



Joined: 15 Mar 2007
Posts: 70

PostPosted: Mon Jul 30, 2007 3:30 am    Post subject: Reply with quote

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
View user's profile Send private message
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Mon Jul 30, 2007 3:43 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group