Humper Posted October 16, 2008 Share Posted October 16, 2008 Hello I would like to make this script: Run("sdk.exe" [, "C:\sdk\"] ) Wait 300 ; How do I wait 300 seconds? ProcessClose("javaw.exe") ; this is correct Wait 1200 ; same here loop ; how to loop script end script when f12 sent How do I add the peramiters after "sdk.exe" java -Xms1024m -Xmx1024m -jar sdk.jar -silent(Like you can do in alot of games for windowed."game.exe" -wAlso how do I pause script for x seconds/ms. How do I loop the script? Thanks in advance. Regards Humper [center][/center] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 16, 2008 Share Posted October 16, 2008 Did you search the forum at all or the helpfile? Look at While ... WEnd loops for your loop structure, Sleep() for waiting (runs in ms), and actually read about the Run() and RunWait() commands, you can add parameters. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Humper Posted October 16, 2008 Author Share Posted October 16, 2008 (edited) Did you search the forum at all or the helpfile? Look at While ... WEnd loops for your loop structure, Sleep() for waiting (runs in ms), and actually read about the Run() and RunWait() commands, you can add parameters. This is my current "version", also I read it but I didn't understand: While ShellExecuteWait("ksd-win.exe" [, "java -Xms1024m -Xmx1024m -jar sdk.jar -silent" [, "D:\ksd2\"]] ) Sleep(300000) ProcessClose("javaw.exe") Sleep(1200000) HotKeySet("!a", "Endscript");end when alt "a" is pressed Func Endscript() ProcessClose("javaw.exe") ProcessClose("Autoit3.exe") Endfunc WEnd What is wrong now, the error is WEnd. I don't really get how to do. Regards Humper Edited October 16, 2008 by Humper [center][/center] Link to comment Share on other sites More sharing options...
herewasplato Posted October 16, 2008 Share Posted October 16, 2008 The "While" line of code will need some expression for it to evaluate.While 1 = 1 will work... but so will While 1try thatShellExecuteWait("ksd-win.exe" [, "java -XRemove the brackets from your code. They are meant to show you that the parameter is optional. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Humper Posted October 17, 2008 Author Share Posted October 17, 2008 The "While" line of code will need some expression for it to evaluate. While 1 = 1 will work... but so will While 1 try that ShellExecuteWait("ksd-win.exe" [, "java -X Remove the brackets from your code. They are meant to show you that the parameter is optional.Thank you for the fast awnser, it worked just fine, just had to fix where hotkeyset need to be. HotKeySet("!a", "Endscript");end when alt "a" is pressed While 1 ShellExecuteWait("Multiclicker-win.exe" , "java -Xms1024m -Xmx1024m -jar sdk.jar -silent" , "D:\Multiclicker\ksd2\Multiclicker") Sleep(300000) ProcessClose("javaw.exe") Sleep(1200000) Wend Func Endscript() ProcessClose("javaw.exe") ProcessClose("Autoit3.exe") Msgbox (3041, "Ended", "Application has ended") Endfunc [center][/center] 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