Jump to content

I'm a n00b so sue me.. x.x


Recommended Posts

I am trying to make a simple key -> click -> wait -> key -> wait looping command. But with about 3 hours of trying to figure out where I am going wrong, I still can't make sense of it. I keep getting unterminated string error. If you could direct me to the mistake I would greatly appreciate it. Thank you for your time and consideration.

#region ---Au3Recorder generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)

_WinWaitActivate("untiltled)","")
myloop:
MouseClick("left",401,321,1)
Send("{F5}")
MouseClick("left",401,321,1)
Sleep, (3000)
Send("{INS}")
Sleep, (3000)
Goto, myloop")

#region --- Internal functions Au3Recorder Start ---
Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc
#endregion --- Internal functions Au3Recorder End ---

#endregion --- Au3Recorder generated code End ---
Link to comment
Share on other sites

that is not how you loop in autoit.

Try a While loop or something

Replace myloop:

with While True

or While 1 if you prefer

then

replace Goto, myloop")

with WEnd

Edit:

Also no , after Sleep just Sleep(3000)

Edited by ShawnW
Link to comment
Share on other sites

that is not how you loop in autoit.

Try a While loop or something

Replace myloop:

with While True

or While 1 if you prefer

then

replace Goto, myloop")

with WEnd

Thank you... I had gotten the loop command from a "Autoit_quickref.pdf" (it may be out of date I suppose) and I did what you recommended but I am still getting the unterminated string error on the final line (14)

EDIT: same after fixing the sleep command.

ReEDIT: :FACEPALM: i fixed it thank you (shouldn't have been editing in AU3Record...)

Edited by Hexavolt
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...