pblikpb Posted February 3, 2016 Share Posted February 3, 2016 how to do it Remarks The search direction varies as follows: Left-to-Right - left < right Right-to-Left - right < left Top-to-Bottom - top < bottom Bottom-to-Top - bottom < top My rectangle coordinates PixelSearch( 900,100,1015,515, 0xff0000 , 2 ) PixelSearch ( left, top, right, bottom, color [, shade-variation = 0 [, step = 1 [, hwnd]]] ) I need PixelSearch ( right, bottom,left, top, color [, shade-variation = 0 [, step = 1 [, hwnd]]] ) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 3, 2016 Developers Share Posted February 3, 2016 @pblikpb, Welcome, I am not sure how often you were planning to post the same question but I have deleted the other 2. Since you are new to our forums I also like to point you to our forumrules so you understand how this community is working. Jos 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. Link to comment Share on other sites More sharing options...
pblikpb Posted February 4, 2016 Author Share Posted February 4, 2016 (edited) Im sorry. How to change the direction to scan the bottom up. Remarks The search direction varies as follows: Left-to-Right - left < right Right-to-Left - right < left Top-to-Bottom - top < bottom Bottom-to-Top - bottom < top Edited February 4, 2016 by pblikpb Link to comment Share on other sites More sharing options...
Malkey Posted February 4, 2016 Share Posted February 4, 2016 I hope this will help with your understanding. #cs The search direction varies as follows: Left-to-Right - left < right Right-to-Left - right < left Top-to-Bottom - top < bottom Bottom-to-Top - bottom < top #ce ; PixelSearch(left, top, right, bottom, color ,s-v) ; Search directions based on the relative sizes of the function parameters (left, top, right, and bottom) $aCoord = PixelSearch( 900, 100, 1015, 515, 0xff0000 , 2 ) ; Left-to-Right & Top-to-Bottom because left < right & top < bottom $aCoord = PixelSearch( 900, 515, 1015, 100, 0xff0000 , 2 ) ; Left-to-Right & Bottom-to-Top because left < right & bottom < top $aCoord = PixelSearch(1015, 100, 900, 515, 0xff0000 , 2 ) ; Right-to-Left & Top-to-Bottom because right < left & top < bottom $aCoord = PixelSearch(1015, 515, 900, 100, 0xff0000 , 2 ) ; Right-to-Left & Bottom-to-Top because right < left & bottom < top ;....................(..^.,..^.,....^.,....^..,......^...,.^.) ; ;....................(left, top, right, bottom, color ,s-v) pblikpb and Jewtus 2 Link to comment Share on other sites More sharing options...
pblikpb Posted February 4, 2016 Author Share Posted February 4, 2016 (edited) Thanks for the answer . Please see all of the code . How can I speed up the script ? If the subject is more likely to appear at the bottom. #include <Misc.au3> #include <WindowsConstants.au3> Global $Autoshoot = 0, $i, $color = 0xFF0000, $scan = 0 HotKeySet("{INSERT}", "startAutoshoot") ; HotKeySet("{DELETE}", "offAutoshoot") ; While 1 ;цикл If $Autoshoot = 1 then PixelSearch( 1015,515,900,100, 0xff0000 , 2 ) ; If Not @error then ; $i = 1 While $i < 2 Call('clicks') ; $i = $i + 1 WEnd EndIf EndIf WEnd Func startAutoshoot() ; $Autoshoot = 1 EndFunc ; Func offAutoshoot() ; $Autoshoot = 0 EndFunc ; Func clicks() ; AutoItSetOption('MouseClickDelay',0) ; MouseClick('left') ; EndFunc Edited February 4, 2016 by pblikpb Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 4, 2016 Moderators Share Posted February 4, 2016 pblikpb, 24 minutes ago, pblikpb said: Func startAutoshoot() ; Are you automating a game? M23 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...
pblikpb Posted February 4, 2016 Author Share Posted February 4, 2016 (edited) yes it Autoshot Edited February 4, 2016 by pblikpb Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 4, 2016 Moderators Share Posted February 4, 2016 pblikpb, I feared as much. You appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23 pblikpb 1 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...
Recommended Posts