Sign in to follow this  
Followers 0
emdy

Help.. cannot detect the WinGetTitle while in game

7 posts in this topic

#1 ·  Posted (edited)

Hello to everyone at Autoit forum..

Im kinda new at this..

I dunno what when wrong?

HotKeySet("{Home}", "Hackon")

Func Hackon()

If WinGetTitle("Trainer") Then

ControlClick ("Trainer", "", 500, "left", 1)

ControlClick ("Trainer", "", 501, "left", 1)

EndIf

EndFunc

Whenever im in the game, the hotkey doesn't work

It only work when im at my desktop

why?

some help pls.. thx

:)

Edited by emdy

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello to everyone at Autoit forum..

Im kinda new at this..

I dunno what when wrong?

HotKeySet("{Home}", "Hackon")

Func Hackon()

If WinGetTitle("Trainer") Then

ControlClick ("Trainer", "", 500, "left", 1)

ControlClick ("Trainer", "", 501, "left", 1)

EndIf

EndFunc

Whenever im in the game, the hotkey doesn't work

It only work when im at my desktop

why?

some help pls.. thx

:)

<{POST_SNAPBACK}>

$Title = WinGetTitle("Trainer")

Func Hackon()
If WinExist($Title) Then
WinActivate($Title)
Sleep(50)
ControlClick ($Title, "", 500, "left", 1)
ControlClick ($Title, "", 501, "left", 1)
EndIf
EndFunc

Hope it helps

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

$Title = WinGetTitle("Trainer")

Func Hackon()
If WinExist($Title) Then
WinActivate($Title)
Sleep(50)
ControlClick ($Title, "", 500, "left", 1)
ControlClick ($Title, "", 501, "left", 1)
EndIf
EndFunc

Hope it helps

<{POST_SNAPBACK}>

hi there.. thx for the reply.. but i got an error while doing that

If WinExist($Title) Then

If ^ ERROR

i also tried this... but error too.. :)

If WinExists($Title) Then

If WinExists(^ ERROR

it still does work when im in game.. i got the error while im at my desktop..

Help pls.. anyone? someone?

Share this post


Link to post
Share on other sites

What is the error it gives you?

If the window does not exist WinGetTitle() returns 1, which could cause an error in WinExists(), however, I would think that WinExists() returns a 0 if the title '1' does not exist...


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

Ok i've played with some stuff and i and up with this..

it work but.. everytime i go back to game, it always presses the shortcut..

at first i dont get it to work.. but when i got it working, it go crazy on me.. :)

HotKeySet("{Home}", "HackOn")

Func Hackon()

While 1

If WinActive("Game") Then

WinGetTitle("Trainer")

ControlClick ("Trainer", "", 500, "left", 1)

ControlClick ("Trainer", "", 501, "left", 1)

EndIf

Wend

EndFunc

help please someone?

:evil:

Share this post


Link to post
Share on other sites

After coming out with this, still no result..

AutoItSetOption("WinTitleMatchMode", 4)

HotKeySet("{NUMPAD1}", "HackOn1")

Func Hackon1()

$handle = WinGetHandle("classname=trainer")

If @error Then

MsgBox(4096, "Error", "1337 33R0R")

Else

ControlClick ($handle, "", 500, "left", 1)

ControlClick ($handle, "", 501, "left", 1)

EndIf

EndFunc

help me someone pls..

im going :):evil:

Share this post


Link to post
Share on other sites

Problem solved...

_IsPressed is the answer

Spamming closed

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0