Odlid Posted May 29, 2009 Share Posted May 29, 2009 (edited) I'm having issues automating a flash game called Dofus. Wondering if anyone has any suggestions. First.....this is not an Autoit installation issue nor a a 'need help programming' request. I've been able to successfully do all of these things in a non-flash game (Freecell). Here are my two issues:Gaining FocusThe following should maximize the Dofus window and make that window have focus. It does neither:WinActive("Dofus ")WinSetState("Dofus ", "", @SW_RESTORE)WinSetState("Dofus ", "", @SW_MAXIMIZE)I got the "Dofus " from Autoit Window Info. Yes, I've tried it without the trailing spaces.Mouse ClickingLet's assume that I have the Dofus window open on the screen then I fire up a compiled Autoit script. I get these actions working: Mouse movement using Opt("MouseCoordMode", 1)Pixel Color Checking using Opt("PixelCoordMode", 1)MouseGetPosHowever none of the following cause a left mouseclick on the Dofus screen:MouseClick("left")MouseClick("primary")ControlClick("Dofus ", "", "","left",1, 100, 100)MouseClick("left",100,100,1,0)MouseClick("primary",100,100,1,0)Global $hWnd$hWnd = WinGetHandle("Dofus ")_MouseClick($hWnd, "left", 100, 100, 1, 0)Func _MouseClick($hWnd, $button, $x, $y, $times=1, $delay=250)If $hWnd = 0 Then SetError(-1) Return EndIf Local $ix Local $lParam = _MakeLong($x, $y) Local $user32 = DllOpen("user32.dll") $button = StringLower($button) For $ix = 1 To $timesDllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", 0x200, "int", 0, "long", $lParam) DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", 0x201, "int", 1, "long", $lParam) DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", 0x202, "int", 0, "long", $lParam) If $ix < $times Then Sleep($delay) Next If $user32 <> -1 Then DllClose($user32)EndFuncFunc _MakeLong($LoWord, $HiWord)Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))EndFuncI only have Vista machines but I've tried this on three separate ones with various mouse drivers - in no case did I get this to work.Additional factoid. MouseMove works until I manually move the mouse. Then MouseMove no longer works over the Dofus screen.Dofus can be found here. Dofus is a flash game but it is really a server side game with a flash front end. The front end seems to render graphics and handle network communications with the Dofus servers. I'm not messing at all with the client code here - I'm strictly trying to animate some boring repetitive tasks that require repetitive key clicks.Any ideas? Edited May 29, 2009 by Odlid Link to comment Share on other sites More sharing options...
Autoitv3noob Posted May 29, 2009 Share Posted May 29, 2009 Well first of all dofus has many fake things and tricks in it which kinda screws Cheat Engine, WPE pro and including autoit v3 and many more, dofus is to be said "UNHACKABLE" by their OWN staff. If you want to actully have a auto clicker just download one -----> MACRO ita a 15 day trial but theres a trick that you can do to keep it forever, just keep reverting the date back to wen it was downloaded by changeing you date and time to wen u downloaded. Also i play dofus and i honstly use this program because farming and alchemist is a pain in the ass. Well i know i didnt help but u cant really do nothin Link to comment Share on other sites More sharing options...
Odlid Posted May 29, 2009 Author Share Posted May 29, 2009 Hmm. If this program can force a keystroke then why can't I do so out of Autoit? I wonder if you can make a generic 'keyclick' program, call it from Autoit, and have the generic program click on the screen. I can position the cursor just fine (as long as i don't touch the mouse manually...) Link to comment Share on other sites More sharing options...
Odlid Posted May 30, 2009 Author Share Posted May 30, 2009 So...are there any suggestions on how to get a mouse click into this program from Autoit? I could use your help.... Link to comment Share on other sites More sharing options...
Autoitv3noob Posted May 31, 2009 Share Posted May 31, 2009 So...are there any suggestions on how to get a mouse click into this program from Autoit? I could use your help....Well i think your out of luck i dont really think there is any way to do that, i looked on youtube and stuff but all i could see is these same or close to this replys over and over again "Dofus is one of Ankama games and they have put alot of work in thier secruity rather than their games and have made thier game unhackable by disabling or redirecting many "cheating" programs [Cheatengine, WPE pro , Autoit sadly and much more trust me(those r the main 3 used)] into somewhere else which causes art money, program crashing and program disabling which is what is happening to autoit, because its not working right. So the only thing u can do is exclude autoit from dofus for now and just do theporgram alone.Usefull for farming but wen a scarecrow pops up i gotta press esc so i can take control all over agin. If you need to contact me the best way is my emailsince i dont check my profile on this site or just contact me in dofus lolz my name is "Infectiondisease" my main char i go on is Dark-Shadowxz Sorry i couldn't help.... Link to comment Share on other sites More sharing options...
Delca Posted July 9, 2009 Share Posted July 9, 2009 Hi, I know it's a big up, but I have a question about this. I wrote an AutoIt script to automate tasks in Dofus. It worked perfectly on my old OS, Windows XP. But I changed to Vista one week ago, and since, I couldn't get my script to click in this window. So I was wondring how could Ankama Games could detect and prevent iti, because it work fine for random flash games found on the Internet. If you found some mistakes, it may be because I'm French. Anyway, thank you for your answers. Link to comment Share on other sites More sharing options...
buertlh Posted November 2, 2018 Share Posted November 2, 2018 hi, Odlid, Have you sovled this problem? I also meet it. the MouseMove doesn't work until I move the mouse manually or wait for about 1 minutes. best, buertlh Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 2, 2018 Moderators Share Posted November 2, 2018 (edited) Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in - they have changed considerably since this thread was started. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team P.S. And necro-posting in threads over 9 years old is also something we frown upon. Edited November 2, 2018 by Melba23 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 Link to comment Share on other sites More sharing options...
Recommended Posts