ashraful089 Posted June 12, 2022 Share Posted June 12, 2022 expandcollapse popup#include <AutoItConstants.au3> ;#include <ButtonConstants.au3> ;#include <ComboConstants.au3> ;#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include "ImageSearch.au3" AutoItSetOption('MouseCoordMode', 0) HotKeySet("p", "Image") HotKeySet("`", "_Terminate") Global $SleepFast = 500, $SleepNormal = 1000, $Sleepsec =1000, $Sec = 1000, $Min = 60000, $Hour = 360000 Local $Startech, $StartechX, $StartechY, $NetFlix, $NetFlixX, $NetFlixY While 1 WEnd Func Image() sleep(100) Do Local $Startech = _ImageSearch('Startech\Startech.png', 1, $StartechX, $StartechY, 100) If $Startech = 1 Then MouseMove($StartechX, $StartechY, 2) MouseClick("left", $StartechX, $StartechY, 1) sleep($SleepNormal) ElseIf $Startech = 0 Then MsgBox($MB_SYSTEMMODAL, "Title", "StarTech Not Found Going for NetFlix Scrolling to Get it", 10) MouseWheel($MOUSE_WHEEL_DOWN, 1) Send("{ESC}") sleep(500) MsgBox($MB_SYSTEMMODAL, "Title", "Exit Not Found ", 10) Else sleep($SleepNormal) MsgBox($MB_SYSTEMMODAL, "Title", "None Found ", 10) EndIf Until $Startech = 1 EndFunc Func _Terminate() MsgBox($MB_SYSTEMMODAL, "Info :", "Script terminated by User" & @CRLF) Exit EndFunc ;==>_Terminate #comments-start Local $NetFlix = _ImageSearch('NetFlix\NetFlix.png', 1, $NetFlixX, $NetFlixY, 100) MouseMove($NetFlixX, $NetFlixY, 2) MouseClick("left", $NetFlixX, $NetFlixY, 1) sleep($SleepNormal) #comments-end in old version this script was wokring but After Scite and autoit version update same script showing error. i am unable to finout the reason, plz help to solve the problem >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\Image Search with do while(Wait Until image Found).au3" /UserParams +>10:53:48 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:00004009 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\Engr. Ashraful\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Engr. Ashraful\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.16.0) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\Image Search with do while(Wait Until image Found).au3 "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(30,46) : error: missing separator character before keyword. Func _ImageSearch($findImage,$resultPosition,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(34,73) : error: missing separator character before keyword. Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(74,63) : error: missing separator character before keyword. Func _WaitForImageSearch($findImage,$waitSecs,$resultPosition,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(109,64) : error: missing separator character before keyword. Func _WaitForImagesSearch($findImage,$waitSecs,$resultPosition,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\Image Search with do while(Wait Until image Found).au3 - 4 error(s), 0 warning(s) !>10:53:49 AU3Check ended. Press F4 to jump to next error.rc:2 +>10:53:49 AutoIt3Wrapper Finished. >Exit code: 2 Time: 1.013 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 12, 2022 Moderators Share Posted June 12, 2022 Moved to the appropriate forum. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AlessandroAvolio Posted June 12, 2022 Share Posted June 12, 2022 5 hours ago, ashraful089 said: expandcollapse popup#include <AutoItConstants.au3> ;#include <ButtonConstants.au3> ;#include <ComboConstants.au3> ;#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include "ImageSearch.au3" AutoItSetOption('MouseCoordMode', 0) HotKeySet("p", "Image") HotKeySet("`", "_Terminate") Global $SleepFast = 500, $SleepNormal = 1000, $Sleepsec =1000, $Sec = 1000, $Min = 60000, $Hour = 360000 Local $Startech, $StartechX, $StartechY, $NetFlix, $NetFlixX, $NetFlixY While 1 WEnd Func Image() sleep(100) Do Local $Startech = _ImageSearch('Startech\Startech.png', 1, $StartechX, $StartechY, 100) If $Startech = 1 Then MouseMove($StartechX, $StartechY, 2) MouseClick("left", $StartechX, $StartechY, 1) sleep($SleepNormal) ElseIf $Startech = 0 Then MsgBox($MB_SYSTEMMODAL, "Title", "StarTech Not Found Going for NetFlix Scrolling to Get it", 10) MouseWheel($MOUSE_WHEEL_DOWN, 1) Send("{ESC}") sleep(500) MsgBox($MB_SYSTEMMODAL, "Title", "Exit Not Found ", 10) Else sleep($SleepNormal) MsgBox($MB_SYSTEMMODAL, "Title", "None Found ", 10) EndIf Until $Startech = 1 EndFunc Func _Terminate() MsgBox($MB_SYSTEMMODAL, "Info :", "Script terminated by User" & @CRLF) Exit EndFunc ;==>_Terminate #comments-start Local $NetFlix = _ImageSearch('NetFlix\NetFlix.png', 1, $NetFlixX, $NetFlixY, 100) MouseMove($NetFlixX, $NetFlixY, 2) MouseClick("left", $NetFlixX, $NetFlixY, 1) sleep($SleepNormal) #comments-end in old version this script was wokring but After Scite and autoit version update same script showing error. i am unable to finout the reason, plz help to solve the problem >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\Image Search with do while(Wait Until image Found).au3" /UserParams +>10:53:48 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:00004009 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\Engr. Ashraful\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Engr. Ashraful\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.16.0) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\Image Search with do while(Wait Until image Found).au3 "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(30,46) : error: missing separator character before keyword. Func _ImageSearch($findImage,$resultPosition,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(34,73) : error: missing separator character before keyword. Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(74,63) : error: missing separator character before keyword. Func _WaitForImageSearch($findImage,$waitSecs,$resultPosition,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\ImageSearch.au3"(109,64) : error: missing separator character before keyword. Func _WaitForImagesSearch($findImage,$waitSecs,$resultPosition,ByRef ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Engr. Ashraful\Dropbox\PC\#Basic\Wait Until Image Found\Image Search with do while(Wait Until image Found).au3 - 4 error(s), 0 warning(s) !>10:53:49 AU3Check ended. Press F4 to jump to next error.rc:2 +>10:53:49 AutoIt3Wrapper Finished. >Exit code: 2 Time: 1.013 CTRL+H , Find what: "," (no space) Replace with: ", " (one space) ashraful089 1 Link to comment Share on other sites More sharing options...
ashraful089 Posted June 12, 2022 Author Share Posted June 12, 2022 @AlessandroAvoliois it the problem of ImageSearch library? same code and library is working good in autoit Version 3.3.14.5 Link to comment Share on other sites More sharing options...
ashraful089 Posted June 12, 2022 Author Share Posted June 12, 2022 i think i found the problem in library file. Space missing before " ByRef $x " Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom, ByRef $x, ByRef $y, $tolerance) Link to comment Share on other sites More sharing options...
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