Jump to content

[Requesting help] Run+permaiters, wait, kill


Humper
 Share

Recommended Posts

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" -w

Also 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

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.

Link to comment
Share on other sites

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 by Humper

[center][/center]

Link to comment
Share on other sites

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.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...