Jump to content

Recommended Posts

Posted (edited)

Opt("MouseCoordMode",0) ; <---- this gave me unknownfunction name how to fix

While 1;Evaluates to TRUE, so infinite While-Wend loop

If WinActive("Monster&Me - HKserver1") Then

Sleep(100)

MouseClick("left", 686, 27, 1, 11)

Sleep(4500)

MouseClick("left", 687, 25, 1, 13)

Sleep(1500)

MouseClick("left", 688, 26, 1, 12)

Sleep(2300)

MouseClick("left", 687, 26, 1, 9)

Sleep(2000)

MouseClick("left", 687, 26, 1, 18)

Sleep(5000)

MouseClick("left", 652, 31, 1, 20)

EndIf

sleep(100);prevent maxing-out the CPU

Edited by lol98
Posted (edited)

This should help get you started:

While 1;Evaluates to TRUE, so infinite While-Wend loop
   If WinActive("Monster&Me - HKserver1") Then
      MouseClick("left", 652, 31, 1, 10)
      Sleep(1000)
      MouseClick("left", 652, 31, 1, 10)
      Sleep(1000)
      MouseClick("left", 652, 31, 1, 10)
      Sleep(1000)
      MouseClick("left", 652, 31, 1, 10)
      Sleep(1000)
      MouseClick("left", 687, 26, 1, 10)
   EndIf
   sleep(100);prevent maxing-out the CPU
WEnd
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

ok how do i get it to click only the co-ordinates inside the window ;/ enstead of just those co-ordinates

look at Opt("MouseCoordMode",... doc
Posted (edited)

but what im saying is how do i use the mousecord option is THIS code

While 1;(Evaluates to TRUE, so infinite While-Wend loop)

If WinActive("Monster&Me - HKserver1") Then

Sleep(100)

MouseClick("left", 686, 27, 1, 11)

Sleep(4500)

MouseClick("left", 687, 25, 1, 13)

Sleep(1500)

MouseClick("left", 688, 26, 1, 12)

Sleep(2300)

MouseClick("left", 687, 26, 1, 9)

Sleep(2000)

MouseClick("left", 687, 26, 1, 18)

Sleep(5000)

MouseClick("left", 652, 31, 1, 20)

EndIf

sleep(100);prevent maxing-out the CPU

WEnd

Edited by lol98
  • Developers
Posted

Cut&Paste helpfile:

MouseCoordMode Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:

1 = absolute screen coordinates (default)

0 = relative coords to the active window (same as AutoIt v2)

So i guess it would need to look like the below, make sure the x,y are now relative to the window!!

Opt("MouseCoordMode",0)

If WinActive("Monster&Me - HKserver1") Then Do

MouseClick ( "left" [, 652, 31 [, 1 [, 10 ]]] )

Sleep, (1000)

MouseClick ( "left" [, 652, 31 [, 1 [, 10 ]]] )

Sleep,(1000)

MouseClick ( "left" [, 652, 31 [, 1 [, 10 ]]] )

Sleep, (1000)

MouseClick ( "left" [, 652, 31 [, 1 [, 10 ]]] )

Sleep, (1000)

MouseClick ( "left" [, 687, 26 [, 1 [, 10 ]]] )

Untill <how can i make this run indefinitly>

EndIf

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

If it said unknown function, you are using a really old version of AutoIt. Get the latest version and try the script again.

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
×
×
  • Create New...