Sign in to follow this  
Followers 0
Popeye1

Help with MouseClick("right", $coord[0] , $coord[1] +100)

4 posts in this topic

#1 ·  Posted (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 by Popeye1

Share this post


Link to post
Share on other sites



Popeye1,

I want to send another mouse click 100 pixels down and 100 pixels to the left of the stored coordinates

The 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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Popeye1,

Nothing in help file about it

As 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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0