Jump to content

Mouse Click


Recommended Posts

I am starting a new thread concerning a mouse click issue.

For those curious the game is Wakfu.

My issue concerns automatization of cropping.

I detect the apparition of the ressource (at a predefined place), and when the ressource is available I move the mouse and then I "MouseClick" right.

This part works correctly.

Then as a consequence of the "right" click two small icons open who represent different options for cropping.

My difficulty starts when i need to "left" click on those icons, i can move over them, but whatever I do I cannot click and activate the function.

I have tried:

MouseClick("left")

ControlClick("Wakfu","")

MouseClickPlus

So OK we should say that these icons are well protected - the fact is that I cannot identify them as a specific control.

BUT, I had previously used a macro recorder who was able to "left" click those icons.

Currently, I have replaced the different MouseClick/ControlClick/MouseClickPlus by an external call "ShellExecuteWait" to my macro recorder application. It then launches the equivalent of MouseDown(X,Y) and MouseUp(X,Y) that works correctly.

But this solution is absolutely not flexible because I need to set manually the parameters of the macro recorder (X,Y) before calling it.

I will make extra tests with the different "Click" options included in AutoIT, but to start with:

1) Do you have any idea why the AutoIT "Clicks" do not work while a simple macro recorder works ?

2) I am searching a short .exe file who just does "left click" when executed (It must be very easy to code with any language for those who know, unfortunately I do not have such knowledge)

Regards

Link to comment
Share on other sites

It is less childish than Dofus, however it is currently and for some months still in OpenBeta. The most interesting feature is the ecology part of the game - the main idea is that if you kill and crop everything there will be nothing left ! However it is possible to seed plants (and it brings experience too)

Link to comment
Share on other sites

It is less childish than Dofus, however it is currently and for some months still in OpenBeta. The most interesting feature is the ecology part of the game - the main idea is that if you kill and crop everything there will be nothing left ! However it is possible to seed plants (and it brings experience too)

Hi,

Get ControlClick function info from helpfile if you havnt do it already..

You just specify window and pos x,y to click :)

Link to comment
Share on other sites

do you mean that I can just use ControlClick ("Wakfu","left",1,X,Y) or do I need to say the full:

ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )

=> ControlClick ( "Wakfu", "", ,"left",1, x , )

Needless to say that I cannot identify text or controlID

Link to comment
Share on other sites

do you mean that I can just use ControlClick ("Wakfu","left",1,X,Y) or do I need to say the full:

ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )

=> ControlClick ( "Wakfu", "", ,"left",1, x , )

Needless to say that I cannot identify text or controlID

Exactly,

$pos=MouseGetPos()
ControlClick("Wakfu", "", "","left",1, $xy[0] , $xy[1])
Link to comment
Share on other sites

Exactly,

$pos=MouseGetPos()
ControlClick("Wakfu", "", "","left",1, $xy[0] , $xy[1])
Where do you put the mouse xy then? Im kinda confused and this is exactly what im looking for!

like do you replace $xy with cords so like $543[0], $345[1]?

Link to comment
Share on other sites

try this way

Global $xy[2]; (or var or local according to your context)

$xy=MouseGetPos()

ControlClick("Wakfu", "", "","left",1, $xy[0] , $xy[1])

$xy contains the coordinates of the mouse (or you can manually declare)

$xy[0]=543

$xy[1]=345

Edited by SlaveLord
Link to comment
Share on other sites

  • 3 years later...
  • Moderators

Kwuality,

As I have just told you in your other thread we do no longer support game automation here. We also frown on necro-posting in threads this old (4 years not 2 ;)) as the language has changed so much since that period the the code is usually out-dated - and necro-posting in a thread which breaks the current rules is particularly egregious. :naughty:

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...