narayanjr Posted May 24, 2007 Posted May 24, 2007 winactivate("Diablo II") winmove("Diablo II","",0,0) ;Run("Diablo II.exe", "C:\Program Files\Diablo II\Diablo II.exe") WinWait("Diablo II") I have tried using winactivate("Diablo II") winmove("Diablo II","",0,0) and it worked one time but then hasn't worked since then then i tried Run("Diablo II.exe", "C:\Program Files\Diablo II\Diablo II.exe") and that doesn't work at all but i can get it to start notepad any idea what I am doing wrong? Thanks
tAKTelapis Posted May 24, 2007 Posted May 24, 2007 The issue would appear to be your run line. Notepad.exe resides in the "system32" folder of windows, this is listed in whats known as the "PATH Variables" You can call a .exe file that in a directory declared in the parth variables, without its entire location. In this case, diablo II.exe is not in the path.. try this instead: Run("C:\Program Files\Diablo II\Diablo II.exe", "C:\Program Files\Diablo II\") It specifies the program to run with a full directory to its executeable, and declares the directory to start it in (so it can find supporting files etc) is the directory it is located in. also, not sure if autoIT will see the window name for diablo 2 unless you are running it in window mode.
narayanjr Posted May 24, 2007 Author Posted May 24, 2007 that did work but when i do it that way it uses the one without the command line parameters Run("C:\Program Files\Diablo II\Diablo II.exe" -mpq cdkey4.mpq -skiptobnet -w -title "Diablo II", "C:\Program Files\Diablo II\") i need somthing like that but it doesnt like the added "" is there a way to make it run a shortcut that already has the command parameters or can i make that line of code work with the right combination of "" or '' or something else
narayanjr Posted May 25, 2007 Author Posted May 25, 2007 still cant get it to work with parameters any ideas? Thanks
Developers Jos Posted May 25, 2007 Developers Posted May 25, 2007 (edited) Run('"C:\Program Files\Diablo II\Diablo II.exe" -mpq cdkey4.mpq -skiptobnet -w -title "Diablo II"') mmm must be some Admin playing with the code stuff ... Edited May 25, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted May 25, 2007 Developers Posted May 25, 2007 (edited) just try the code i posted ..... the PS wasn't for you but Jon Edited May 25, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
narayanjr Posted May 25, 2007 Author Posted May 25, 2007 Thank you that worked i just had to had the working dir for it to work the right way without it it brought up the game but it was missing some kind of check so it wouldnt let me connect to the internet
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