Sign in to follow this  
Followers 0
Metigue

MouseMove in fullscreen direct x games

8 posts in this topic

#1 ·  Posted (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:

Global $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 by Metigue

Share this post


Link to post
Share on other sites



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 Gude
How 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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Metigue

Share this post


Link to post
Share on other sites

thats not what the title says...


[spoiler]My UDFs: Login UDF[/spoiler]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Read the edit of the post above you :huh2:, 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 by Metigue

Share this post


Link to post
Share on other sites

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 Gude
How 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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

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