Jiggaboo Posted November 17, 2007 Share Posted November 17, 2007 Hey, so I play Hellgate: London, and more often than not, it freezes up on me, and the only way I can quit is to turn off my computer. So, instead of doing that, I would rather just kill the process (and the only way to do that is by pressing a key, because I am unable to leave the game window) so I made a simple script to kill the process once I press the specified hotkey. So this all works great, but I thought I would improve the script, so I would no longer have to run both files (the script that will kill the game, and the game itself). So I want to have the script start the game for me. This is so simple, I cannot believe I am having problems with it. I have somehow messed up the syntax and just cannot figure it out. Any help would be greatly appreciated. HotKeySet("{End}", "Kill") Run("Launcher", "C:\Program Files\Flagship Studios\Hellgate London\") Sleep(1500) Send("{TAB}") Sleep(200) Send("{ENTER}") ;Add auto-logon hurr While 1 Sleep(5000) WEnd ;~~~~~~~~~~~~~~~ Func Kill() ProcessClose("hellgate_mp_dx9_x86.exe") EndFunc Line 2 is where I am having problems. The error says that it is unable to execute the external program, because it cannot find the file. But I know that this is the file name .. so I must have screwed up the syntax somehow. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Generator Posted November 17, 2007 Share Posted November 17, 2007 Try this..Run("Launcher.exe", "C:\Program Files\Flagship Studios\Hellgate London\")If doesn't work then this..ShellExecute("C:\Program Files\Flagship Studios\Hellgate London\Launcher.exe") Link to comment Share on other sites More sharing options...
Jiggaboo Posted November 17, 2007 Author Share Posted November 17, 2007 Try this..If doesn't work then this..Thanks for the reply, I appreciate it.On the first suggestion, I got the same error.And on the second, it says that ShellExecute function is an unknown Function name. Link to comment Share on other sites More sharing options...
Nahuel Posted November 17, 2007 Share Posted November 17, 2007 What version of AuotoIt do you have? MsgBox(0,"",@AutoItVersion) Link to comment Share on other sites More sharing options...
Jiggaboo Posted November 17, 2007 Author Share Posted November 17, 2007 What version of AuotoIt do you have? MsgBox(0,"",@AutoItVersion) 3.1.1.0 Link to comment Share on other sites More sharing options...
Nahuel Posted November 17, 2007 Share Posted November 17, 2007 haha, dude version 3.2.9.6 is out there Download that first and check the code Generator gave you. Link to comment Share on other sites More sharing options...
Jiggaboo Posted November 17, 2007 Author Share Posted November 17, 2007 (edited) O_O Wow I am way behind! Thanks a lot for your replies man, I really appreciate the help. -edit- Well, that fixed it (the ShellExecute) and now it works flawlessly. Thanks a lot for everyones help! Edited November 17, 2007 by Jiggaboo Link to comment Share on other sites More sharing options...
Zedna Posted November 17, 2007 Share Posted November 17, 2007 Or simpler approach: use absolute fliename in Run Run("C:\Some path\Launcher.exe", "C:\Program Files\Flagship Studios\Hellgate London\") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now