Metigue Posted May 25, 2011 Share Posted May 25, 2011 (edited) I'm trying to code an autoclicker for form completion, Just for kicks. The forms are rendered inside of a direct X form platform, which is a fullscreen executable, the forms themselves are one click jobs on 3 different coloured options. The background of the form platform is all greyscale, so conflicting pixels is not a problem. However, when I'm in the form platform, my code will not move the mouse. I've never bothered with using ActiveWindow or whatever before in autoit, as it was never needed. Is this a possible solution? My code looks like this: expandcollapse popupGlobal $FormClicker = 0 Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) Hotkeyset ("{HOME}", "FindForm") Hotkeyset ("{INS}", "FindClickForm") HotKeySet ("{End}", "TurnoffFormFinder") Global $searchcolor = 0xD1A177 Find() Func Find() While 1 If $FormFinder = 1 then $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $searchcolor) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) EndIf EndIf If $FormFinder = 2 Then; Find + Click $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $searchcolor) If IsArray($coord) = 1 Then MouseClick('left', $coord[0], $coord[1], 1, 0) EndIf EndIf If $FormFinder = 0 Then sleep(1000) EndIf Wend EndFunc Func FindForm() $FormFinder = 1 Tooltip("FormFinder is Auto-Finding", 0, 0) Find() EndFunc Func FindClickForm() $FormFinder = 2 Tooltip("FormFinder is Auto-Clicking", 0, 0) Find() Endfunc Func TurnoffFormFinder() $FormFinder = 0 Tooltip("Formfinder is Off", 0 ,0) Find() Endfunc Any help would be appreciated Edited May 25, 2011 by Metigue Link to comment Share on other sites More sharing options...
BrewManNH Posted May 25, 2011 Share Posted May 25, 2011 Please read this before going further. Thanks. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Metigue Posted May 25, 2011 Author Share Posted May 25, 2011 (edited) I don't think I am in conflict with anything there, as this is for automation of form completion. Not for anything game related. Edit: The topic says games, Because form platform would have driven more people away from my thread. And that rule is a new addition since I joined over a year ago. Edited May 25, 2011 by Metigue Link to comment Share on other sites More sharing options...
pieeater Posted May 25, 2011 Share Posted May 25, 2011 thats not what the title says... [spoiler]My UDFs: Login UDF[/spoiler] Link to comment Share on other sites More sharing options...
Metigue Posted May 25, 2011 Author Share Posted May 25, 2011 (edited) Read the edit of the post above you , Now any help? I previously thought MouseMove was global? Edit: It definitely has no trouble with finding the pixel, as it is finding it in screen captures of the forms, however, it will not move the mouse to the coordinates when running the form platform. Edit2: Does not work with ActivateWindow('FormHandler 2.0') Edited May 25, 2011 by Metigue Link to comment Share on other sites More sharing options...
BrewManNH Posted May 26, 2011 Share Posted May 26, 2011 I don't think I am in conflict with anything there, as this is for automation of form completion. Not for anything game related.Edit: The topic says games, Because form platform would have driven more people away from my thread. And that rule is a new addition since I joined over a year ago.You and I both know that the topic was about an aimbot before your recent edit. Which is why replied the way I did. Your topic now is not out of compliance so I leave it to the community to help as they see fit, carry on. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Metigue Posted May 26, 2011 Author Share Posted May 26, 2011 Ok change of question, Since Direct x 9 platforms block all methods of input besides direct, is there anyway of using autoit to create direct input? Link to comment Share on other sites More sharing options...
Valik Posted May 26, 2011 Share Posted May 26, 2011 I don't think I am in conflict with anything there, as this is for automation of form completion. Not for anything game related.Edit: The topic says games, Because form platform would have driven more people away from my thread. And that rule is a new addition since I joined over a year ago.Hmm, it's too bad there has been a game bot announcement up in one form or another for a couple years now. So you're lying, stupid or blind. Possibly all three.If you even breathe the word "game" or "DirectX" while visiting this forum you will be removed. Thread locked. Link to comment Share on other sites More sharing options...
Recommended Posts