Jump to content

Recommended Posts

Posted

Everytime I run it, it won't click the firefox on my desktop.

$Paused = 1
HotKeySet("{F8}", "TogglePause")
HotKeySet("{Esc}", "Terminate")

$coord = PixelSearch( 500, 500, 20, 300, 0xE1781B )
If Not @error Then
    MouseClick("left", $coord[0], $coord[1])
    $paused = 0
EndIf
;----------------------------------------------------------------------
;FUNCTION                                                       ;----
Func TogglePause() 
$Paused = NOT $Paused
While $Paused
ToolTip('Please press "F8" to resume!',600,200,"",1,2)
sleep(1000)
WEnd
ToolTip("")
EndFunc
Func Terminate()
    Exit 0
EndFunc
;----------------------------------------------------------------------
Posted

Everytime I run it, it won't click the firefox on my desktop.

$Paused = 1
HotKeySet("{F8}", "TogglePause")
HotKeySet("{Esc}", "Terminate")

$coord = PixelSearch( 500, 500, 20, 300, 0xE1781B )
If Not @error Then
    MouseClick("left", $coord[0], $coord[1])
    $paused = 0
EndIf
;----------------------------------------------------------------------
;FUNCTION                                                   ;----
Func TogglePause() 
$Paused = NOT $Paused
While $Paused
ToolTip('Please press "F8" to resume!',600,200,"",1,2)
sleep(1000)
WEnd
ToolTip("")
EndFunc
Func Terminate()
    Exit 0
EndFunc
;----------------------------------------------------------------------
Maybe because your PixelSearch coordinates are incorrect. Maybe you meant

$coord = PixelSearch( 500, 500, 500+20,500+ 300, 0xE1781B )
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted

Maybe because your PixelSearch coordinates are incorrect. Maybe you meant

$coord = PixelSearch( 500, 500, 500+20,500+ 300, 0xE1781B )
The program still won't run.

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