Jump to content

Help Please


Recommended Posts

hi I don't get it this script will click were your mouse is pointed it should aim for the pixel am I correct or not or am i being a :think: lol

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")



While 1
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x003FD0); will search your entire screen area for a pixel of the color 0x000000
    If IsArray($coord) = 1 Then
 MouseClick("left")
        EndIf
WEnd
Exit
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc
Thanks in advance
Link to comment
Share on other sites

While 1
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x003FD0); will search your entire screen area for a pixel of the color 0x000000
    If IsArray($coord) = 1 Then
 MouseClick("left")
EndIf
Wend
I think that all you missing is that your not defing the array coords in MouseClick

you should be

While 1
    $coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x003FD0); will search your entire screen area for a pixel of the color 0x000000
    If IsArray($coord) = 1 Then
 Mouseclick("left", $coord[0],$coord[1],0);<<<<<<<<<<<<
EndIf
Wend

something like that

I'm sure you knew that but weren't thinking straights :think:

Edited by Paulie
Link to comment
Share on other sites

greenmachine (and Paulie) posted the way to correct your code. greenmachine asked you questions in the comments of his code... are you going to try this code? or are you going to start another topic and ask the same question... again.

http://www.autoitscript.com/forum/index.ph...ndpost&p=177258

[size="1"][font="Arial"].[u].[/u][/font][/size]

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