darksoltan Posted January 30, 2012 Share Posted January 30, 2012 Hey guys, this is what I'm trying to do... have autoit search for a blue moving bar, based on the location of mouse position, so the mouse dictates the pixelsearch parameters. While at the same time the mouse clicks the black box below the blue bar every half a second. I've rattled my brain for 2 hours now and can't come up with a solution. Any guesses?http://imgur.com/4zkpeHotKeySet('{ESC}','_exit') sleep(2000) While 1 Global $mouse = MouseGetPos() $Coord = PixelSearch( $mouse[0]-150, $mouse[1]-45, $mouse[0]+150, $mouse[1]+45, 0x3F48CC, 5, 5) ; Search a blue bar near mouse position While @error = 0 MouseClick("left",$coord[0]+45,$coord[1]+40) MouseMove($coord[0], $coord[1], 1) $Coord = PixelSearch( $mouse[0]-40, $mouse[1]-40, $mouse[0]+40, $mouse[1]+40, 0x3F48CC, 5, 5) WEnd sleep(100) WEnd Func _exit() Exit EndFunc Link to comment Share on other sites More sharing options...
Blinky Posted January 30, 2012 Share Posted January 30, 2012 try this in stead of the second loop While @error = 0 MouseMove($coord[0], $coord[1], 1) Sleep(500) $mouse = MouseGetPos() $Coord = PixelSearch( $mouse[0]-60, $mouse[1]-60, $mouse[0]+60, $mouse[1]+60, 0x3F48CC, 5, 5) If @error Then ExitLoop MouseClick("left",$coord[0]+45,$coord[1]+40,1,1) WEnd it will click every half second raised the speed to not click outside the box enlarged secon search area to avoid errors included mousegetpos in the loop to refresh coord Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 1, 2012 Share Posted February 1, 2012 Thread smells like a game as mentioned in duplicate thread here: Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 1, 2012 Moderators Share Posted February 1, 2012 And darksoltan, I still don't see where you've complied with the Mod's request to provide a legitimate reason for your request... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 1, 2012 Moderators Share Posted February 1, 2012 darksoltan, 2200 UTC and no explanation. Do not start a third thread on this subject. 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...
Recommended Posts