Jump to content

looping/not looping


Recommended Posts

ok i only want one part of this to happen on the load and then the outher part to loop please help me thanx in advance

[ Code]

HotKeySet("1", "end")

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

$title = "SwgClient"

WinWait($title,"")

While 1

If Not WinActive($title,"") Then WinActivate($title,"")

MouseMove ( 769, 710 ) ;i want this to only happen once when i first run it

MouseClick("Left", 769, 710, 1, 1);i want this to only happen once when i first run it

MouseMove ( 207, 212 ) ;i want this to loop

MouseClick("Left", 207, 212, 1, 1) ;i want this to look

WEnd

Func end()

Exit (0)

EndFunc ;==>end

[ /Code]

Link to comment
Share on other sites

  • Moderators

ok i only want one part of this to happen on the load and then the outher part to loop please help me thanx in advance

HotKeySet("1", "end")
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)

$title = "SwgClient"

WinWait($title,"")
While 1
If Not WinActive($title,"") Then WinActivate($title,"")
MouseMove ( 769, 710 );i  want this to only happen once when i first run it
MouseClick("Left", 769, 710, 1, 1);i  want this to only happen once when i first run it
MouseMove ( 207, 212 );i want this to loop
MouseClick("Left", 207, 212, 1, 1);i want this to look
WEnd

Func end()
    Exit (0)   
EndFunc  ;==>end
Well thank you for the effort on the code tags (they have no spaces)...

I'm seeing the same code over and over today...

HotKeySet("1", "end")
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)

$title = "SwgClient"

WinWait($title,"")
If Not WinActive($title,"") Then WinActivate($title,"")
MouseMove ( 769, 710 ) ;i  want this to only happen once when i first run it
MouseClick("Left", 769, 710, 1, 1);i  want this to only happen once when i first run it
While 1
    MouseClick("Left", 207, 212, 1, 1) ;i want this to look
    Sleep(10)
WEnd

Func end()
    Exit (0)   
EndFunc   ;==>end

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...