emdy Posted July 1, 2005 Share Posted July 1, 2005 (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") ThenControlClick ("Trainer", "", 500, "left", 1)ControlClick ("Trainer", "", 501, "left", 1)EndIfEndFuncWhenever im in the game, the hotkey doesn't workIt only work when im at my desktopwhy?some help pls.. thx Edited July 1, 2005 by emdy Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 1, 2005 Moderators Share Posted July 1, 2005 (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") ThenControlClick ("Trainer", "", 500, "left", 1)ControlClick ("Trainer", "", 501, "left", 1)EndIfEndFuncWhenever im in the game, the hotkey doesn't workIt only work when im at my desktopwhy?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 EndFuncHope it helps Edited July 1, 2005 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. Link to comment Share on other sites More sharing options...
emdy Posted July 2, 2005 Author Share Posted July 2, 2005 $Title = WinGetTitle("Trainer") Func Hackon() If WinExist($Title) Then WinActivate($Title) Sleep(50) ControlClick ($Title, "", 500, "left", 1) ControlClick ($Title, "", 501, "left", 1) EndIf EndFuncHope it helps<{POST_SNAPBACK}>hi there.. thx for the reply.. but i got an error while doing thatIf WinExist($Title) ThenIf ^ ERRORi also tried this... but error too.. If WinExists($Title) ThenIf WinExists(^ ERRORit still does work when im in game.. i got the error while im at my desktop..Help pls.. anyone? someone? Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted July 2, 2005 Share Posted July 2, 2005 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()) Link to comment Share on other sites More sharing options...
emdy Posted July 2, 2005 Author Share Posted July 2, 2005 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 1If WinActive("Game") ThenWinGetTitle("Trainer")ControlClick ("Trainer", "", 500, "left", 1)ControlClick ("Trainer", "", 501, "left", 1)EndIfWendEndFunchelp please someone? Link to comment Share on other sites More sharing options...
emdy Posted July 2, 2005 Author Share Posted July 2, 2005 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)EndIfEndFunchelp me someone pls..im going Link to comment Share on other sites More sharing options...
emdy Posted July 2, 2005 Author Share Posted July 2, 2005 Problem solved... _IsPressed is the answer Spamming closed Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now