SlaveLord Posted December 4, 2008 Posted December 4, 2008 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
AzKay Posted December 4, 2008 Posted December 4, 2008 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- #
SlaveLord Posted December 4, 2008 Author Posted December 4, 2008 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)
FireFox Posted December 4, 2008 Posted December 4, 2008 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
SlaveLord Posted December 5, 2008 Author Posted December 5, 2008 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
FireFox Posted December 5, 2008 Posted December 5, 2008 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])
Bower Posted December 7, 2008 Posted December 7, 2008 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]?
SlaveLord Posted December 7, 2008 Author Posted December 7, 2008 (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 December 7, 2008 by SlaveLord
Kwuality Posted August 6, 2012 Posted August 6, 2012 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?
Moderators Melba23 Posted August 6, 2012 Moderators Posted August 6, 2012 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. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts