RunWait, "c:\adresář se soubory\můj program.exe"System cannot find the file. Must I save my script in Windows 1250 encoding or how should I tell the program that path is in Unicode?
[SOLVED] cannot launch program
Started by
BrandonHotkey
, May 22 2012 11:25 AM
8 replies to this topic
#1
Posted 22 May 2012 - 11:25 AM
#2
Posted 22 May 2012 - 12:31 PM
try this:
1. make a shortcut to the program and call it c:\test.lnk
2. change the code to RunWait, c:\test.lnk
3. see if that helps
1. make a shortcut to the program and call it c:\test.lnk
2. change the code to RunWait, c:\test.lnk
3. see if that helps
#3
Posted 22 May 2012 - 12:33 PM
are you using the Unicode version of AHK_L?
#4
Posted 22 May 2012 - 02:00 PM
#5
Posted 22 May 2012 - 02:02 PM
normal AHK is not so great with unicode. Try the AHK_L version for your system. make sure you save your script in unicaode format. normal AHK can't read script in unicode format, but AHK_L can.
l.autohotkey.net
l.autohotkey.net
#6
Posted 22 May 2012 - 02:53 PM
Many thanks!
#7
Posted 22 May 2012 - 03:04 PM
Yet, can you help me with this:
#p:: send ^c IfWinNotExist , SAPI5 TTSAPP RunWait, "P:\PROGRAMY\jiné\TTS Voices\MS Speech SDK 5.1\Bin\TTSApp.exe" WinActivate , SAPI5 TTSAPP Click 300, 100 send ^a send ^v ControlSend, Speak, SAPI5 TTSAPP Click 498, 106 ; WinMove, SAPI5 TTSAPP, , 200,500 returnNormally when the program is opened (but not active) is will copy text, and activate window and insert text and play. But If I close the window, then I want to open new window and to do the same action as above. But after opening the program by script, nothing plays. Then when I close the program, it looks, that the rest of script starts continuing. But I would want to continue just after the Window is opened by script.
#8
Posted 22 May 2012 - 03:17 PM
RunWait forces the script to wait until the window is closed. If you do
You should follow Run with WinWait or WinWaitActive to give the program a chance to open.
Run, it will run the program, then continue with the scriptYou should follow Run with WinWait or WinWaitActive to give the program a chance to open.
#9
Posted 22 May 2012 - 04:27 PM
Now it works :-) thanks




