Jump to content

Problem with cheatengine Script (Mouseclicks)


Recommended Posts

I am having a problem sending mouseclicks to the program, I feel like I have tried everything including controlclick but the ID changes each time you start the program with controlclick so that doesn't work. I figured out how to start cheatengine without the windows authorization prompt (which messes up the script) and the mouse will move to the appropriate area but doesn't click... I can't figure it out, hope someone with more knowledge can help me... Here is the script.

---------------------------------------------------

$cheatengine = "C:\Windows\System32\schtasks.exe /run /TN nouac1"

Run($cheatengine)
If WinActive("Cheat Engine 6.3") Then
sleep(1000)
WinWaitActive("Cheat Engine 6.3")
sleep(100)
WinActivate("Cheat Engine 6.3")
EndIf
MouseMove( 25, 68)
MouseMove( 100, 100)
MouseMove( 25, 68)
MouseClick("LEFT", 23,71)
WinActivate("Cheat Engine 6.3")

Exit

----------------------------------------------------------

currently it opens, moves the mouse to the three locations but doesn't click. All the win activates are in hopes to get it to click... I know it needs to be cleaned up but was trying a bunch of stuff.

Link to comment
Share on other sites

Why are you moving the mouse three times and then clicking in a fourth location?

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

Link to comment
Share on other sites

Why are you moving the mouse three times and then clicking in a fourth location?

I was doing that just to confirm the mouse was working. I want it to read.

$cheatengine = "C:\Windows\System32\schtasks.exe /run /TN nouac1"

Run($cheatengine)
If WinActive("Cheat Engine 6.3") Then
sleep(1000)
WinWaitActive("Cheat Engine 6.3")
sleep(100)
WinActivate("Cheat Engine 6.3")
EndIf

MouseClick("LEFT", 23,71)
 

Exit

and that's it but it won't click.

the mouse moves though to the correct location, just doesn't click....

 

Edited by Twelveteen
Link to comment
Share on other sites

I'm going to ask this: Seeing how the poster is new, CheatEngine is involved here, and no other information is given, Is this for a game? If yes, then please understand the rules of this forum do not allow the discussion of game automation. It is a zero tolerance policy. If it isn't for a game then what is the name of the application you are using CheatEngine with? Thanks

edit: CheatEngine is usually used for the hacking of games so that is why I ask the question.

Edited by Bert
clarity
Link to comment
Share on other sites

I'm going to ask this: Seeing how the poster is new, CheatEngine is involved here, and no other information is given, Is this for a game? If yes, then please understand the rules of this forum do not allow the discussion of game automation. It is a zero tolerance policy. If it isn't for a game then what is the name of the application you are using CheatEngine with? Thanks

edit: CheatEngine is usually used for the hacking of games so that is why I ask the question.

It's just to learn how to use autoit. No games involved. I am not planning on doing any game automation. I have been doing some tutorials and made this one the other day (I changed the image to a folder on my desktop) thought it'd be a funny joke for my wife.

$var = MsgBox(4, "Porn folder", "Would you like to continue?")
If $var = 6 then MsgBox(0, "Yes!", "( o Y o ) boobies")
If $var = 7 then MsgBox(0, "No?", "No!? I knew you'd click yes first ;)")

Link to comment
Share on other sites

It's just to learn how to use autoit. No games involved. I am not planning on doing any game automation. I have been doing some tutorials and made this one the other day (I changed the image to a folder on my desktop) thought it'd be a funny joke for my wife.

$var = MsgBox(4, "Porn folder", "Would you like to continue?")
If $var = 6 then MsgBox(0, "Yes!", "( o Y o ) boobies")
If $var = 7 then MsgBox(0, "No?", "No!? I knew you'd click yes first ;)")

It is great you are educating yourself however joke scripts are also not allowed to be discussed here.  Moderators really do not like them and have a tendency to get their knickers in a twist when they see one.   

Edited by Bert
clarity
Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...