Jump to content

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


Popeye1
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...