Jump to content
Sign in to follow this  
stupidlazykid5

need helping adding a function

Recommended Posts

stupidlazykid5

alrighty, a pretty simple script or w/e if it is or not

what i am trying to do is add a wingettext function in it

and make it "start" the script, isntead of me pressing the "Home" key

how would i tweak it inside?

hotkeyset("{Home}","start")
HotKeySet("{end}","stop")
HotKeySet("{Pause}","Wait")


Func start()
#region --- ScriptWriter generated code Start --- 
Opt("WinWaitDelay",250)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinGetText("Saga Ragnarok Online 1","")
If Not WinActive("Saga Ragnarok Online 1","") Then WinActivate("Saga Ragnarok Online 1","")
WinWaitActive("Saga Ragnarok Online 1","")
Send("{F1}")
Sleep("250")
Send("{Enter}")
Sleep("250")
Send("{Enter}")
Sleep("250")
Send("{Home}")

#endregion --- ScriptWriter generated code End --- 
EndFunc


While 1
    Sleep(25)
WEnd


Func Wait()
      sleep("3600000")
     Exit
EndFunc


Func Stop()
    Sleep(25)
    Exit
EndFunc

Share this post


Link to post
Share on other sites
Richard Robertson

Instead of putting it in a function, just put the code at file level. Or you could manually call the function at file level.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.