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 

The programms close right after starting them.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
dmatch



Joined: 15 Oct 2007
Posts: 113

PostPosted: Sun Oct 21, 2007 3:59 pm    Post subject: "Quote It" Reply with quote

I have had results like this when spaces were in the folder names. Adding double quotes (") around the file to be run has worked for me. Like this:

Code:

Run "C:\Games\World of Warcraft 2.1.3\WoW.bat"


Hope this helps,

dmatch
Back to top
View user's profile Send private message
YMP



Joined: 23 Dec 2006
Posts: 266
Location: Russia

PostPosted: Sun Oct 21, 2007 4:55 pm    Post subject: Reply with quote

Superfraggle wrote:

Im guessing you may just have to set the working directory of each one.

Very likely. At least, that was the cause of similar problems I had when launching some games via AutoHotkey.

As for spaces in file paths, I never got into trouble with them and the Run command.
Back to top
View user's profile Send private message
ToLazyToLogIn
Guest





PostPosted: Sun Oct 21, 2007 6:04 pm    Post subject: Reply with quote

Hello again,

thanks for the hint, the " ... " fixed the space problem, but the programs still dont run.

The cmd /k doesnt have any output anymore now, the command prompt appears, the frame of the program window appears (i'm able to read the win title, so it's definitely the program AHK should run) but 2secs later it's gone again.

It leaves me with the "working dir" of my script in the command prompt.

Any different ideas?
Back to top
ToLazyToLogin
Guest





PostPosted: Sun Oct 21, 2007 7:03 pm    Post subject: Reply with quote

Ok, it's fixed, thx to anyone Razz, maybe this will also help MaienM.

The Run command has the following parameters:

Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]

So, it's like (for c:\My Documents\fixed.exe):

Run, fixed.exe, c:\My Documents

Great Smile, i guess being tired when doing something new isn't the best idea Razz.
Back to top
*Lexikos
Guest





PostPosted: Mon Oct 22, 2007 12:10 am    Post subject: Reply with quote

"Use quote marks around paths that can contain spaces." The same goes for any command-line argument.
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2739
Location: Australia, Qld

PostPosted: Mon Oct 22, 2007 12:12 am    Post subject: Reply with quote

Oops, didn't notice the second page. The forum likes to be a pain and forget that I'm logged in.
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
Goto page Previous  1, 2
Page 2 of 2

 
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