Jump to content

Chasing a COLOR BAR while Mouseclicking BELOW the color bar


Recommended Posts

Newbie here. I've rattled my brain and can't make this work. What I want to do is... once the mouse is in the area of a moving blue bar, autoit pixelsearches a fixed parameters of say 50height x 150length, relative to the position of the mouse, for the "blue bar", once it finds it, the mouse follows the moving bar indefinitely or until the bar disappears, while at the same time, and this is the hard part, clicking in a box right below the moving blue bar. Where the mouse is at all times, is irrelevant, as long as its able to click the box below the bar.

This one has me stomped. Can anyone solve this?

Blue Bar Example: http://imgur.com/4zkpe

HotKeySet('{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

I'd be very surprised if this was not for a game. Thats something not supported or allowed around here as stated in the rules.

Link to comment
Share on other sites

  • Moderators

darksoltan,

You already have a thread running on exactly the same question - how about sticking to just the one at a time. ;)

And I share Beege's suspicions - please give me a reason in the other thread why I should not lock that one too. You have until 2200 UTC today. :)

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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