Popeye1 Posted December 28, 2009 Share Posted December 28, 2009 (edited) If UBound($undock_check)>1 Then Sleep(1000) ExitLoop Else $coord = PixelSearch( 780, 150, 1010, 605, 0x733C9E, 10 ) If Not @error Then ; pixel found - do ur thing ;MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) MouseClick("right", $coord[0] , $coord[1]) Sleep(1000) MouseClick("left", $coord[0] , $coord[1] +23) Sleep(1000) MouseClick("right", $coord[0] , $coord[1]) Sleep(500) MouseClick("right", $coord[0] , $coord[1] +100) EndIf I am searching for a pixel and storing the coordinates it is found at, the mouse then clicks this coordinate and then clicks again 23 pixels down, then it clicks the coordinates again, clicks 100 pixels down, but the next part I don't know how to do, I want to send another mouse click 100 pixels down and 100 pixels to the left of the stored coordinates, how can I add this? What would work even better is just sending another mouse click 100 pixels left of the current mouse coordinates. Anyone know how to do this? Edited December 28, 2009 by Popeye1 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 28, 2009 Moderators Share Posted December 28, 2009 Popeye1, I want to send another mouse click 100 pixels down and 100 pixels to the left of the stored coordinatesThe way you moved the mouse in the vertical also works in the horizontal - except you add/subtract from $coord[0] rather than $coord[1]. To move 100 pixels down = $coord[1] + 100 To move 100 pixels left = $coord[0] - 100 You might like to think about some error-checking to make sure you are clicking in the screen - the macros @DesktpWidth and @DesktopHeight could come in handy here! 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...
Popeye1 Posted December 28, 2009 Author Share Posted December 28, 2009 Ah yeah that works, i just figured it out before you posted too lol. What does @DesktpWidth and height do? Nothing in help file about it. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 28, 2009 Moderators Share Posted December 28, 2009 Popeye1,Nothing in help file about itAs the pantomime Dame often says at this time of year: "Oh yes there is!".Try looking under <Macro Reference - System Info Macros> and scroll to the bottom of the page.I await the grovelling apology....... 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
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