Jump to content

For...Next...Exits


Recommended Posts

For whatever reason when I call the function with the hotkey , it works just fine...however once the function has ran it doesn't go back to the 'while loop' , instead it exits and gives no warning.

#include <Misc.au3>
#include <Array.au3>
 
;_Singleton(@ScriptName)
 
HotKeySet("{HOME}", "_Pre")
 
While 1
Sleep(1000)
WEnd
 
Func _Pre()
Local $Array[8] = [".", "n", "m", "Switch", "v", "c", "Switch", "Main"]
;_ArrayDisplay($Array) ; Debug
 
For $i = 0 To UBound($Array) +1
If $Array[$i] = "Main" Then
Send("/")
Sleep(500)
ElseIf $Array[$i] = "Switch" Then
Sleep(1000)
Send("w")
Sleep(1000)
Else
Send($Array[$i])
Sleep(300)
MouseClick("Right")
Sleep(500)
EndIf
Next
EndFunc
Edited by SkellySoul
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...