Sign in to follow this  
Followers 0
SlaveLord

Mouse Click

11 posts in this topic

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

Share this post


Link to post
Share on other sites



Nothing to do with the question; I may look into it if I decide to try the game.

Is Wakfu better or worse than Dofus?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
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)

Share this post


Link to post
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 :)


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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

Share this post


Link to post
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])

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

That's clear - I will try this way.

Share this post


Link to post
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]?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

This solution does not appear to work.

Now I know this thread is old, but I'm currently looking for a solution as well for the issue this guy encountered 2years ago.

Anyone have any ideas?

Share this post


Link to post
Share on other sites

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


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
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0