Rackaracka Posted July 4, 2018 Posted July 4, 2018 if $result[0]="0" then return 0 if $result^ ERROR comes up after i have tried to run an Image Search script which failed source code #include <ImageSearch.au3> global $y = 0, $x = 0 $x1=0 $y1=0 $result=_ImageSearch("start.bmp", 1, $x1, $y1, 0) if $result = 1 then msgbox(0,"Result","Found!") else msgbox(0,"Result","Not Found!") endif please help, why is this error comming up
careca Posted July 4, 2018 Posted July 4, 2018 ;=============================================================================== ; ; Description: Find the position of an image on the desktop ; Syntax: _ImageSearchArea, _ImageSearch ; Parameter(s): ; $findImage - the image to locate on the desktop ; $tolerance - 0 for no tolerance (0-255). Needed when colors of ; image differ from desktop. e.g GIF ; $resultPosition - Set where the returned x,y location of the image is. ; 1 for centre of image, 0 for top left of image ; $x $y - Return the x and y location of the image ; ; Return Value(s): On Success - Returns 1 ; On Failure - Returns 0 ; ; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify ; a desktop region to search ; ;=============================================================================== Experiment with tolerance, something like this works for me. #include <ImageSearch.au3> Local $x, $y While 1 If _ImageSearch(@ScriptDir&'\Capture.PNG',1, $x, $y, 10, 0)=1 Then ConsoleWrite(' - _ImageSearch - '&$x&' '&$y&' - '&@MSEC&@CRLF) Sleep(100) WEnd Reveal hidden contents Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now