akifennec How do I cheat?
Reputation: 0
Joined: 12 Sep 2009 Posts: 1
|
Posted: Sat Sep 12, 2009 9:10 pm Post subject: AutoIt Scripting Questions |
|
|
Hi I have some questions about scripts in AutoIt
1. is there a way to find a control id if AutoIt window info cant find one
2. I have a few scripts that im sure that work but wont in the game client.Why?
Heres my scripts ive made for my bots there not the best im still learning
Code: | HotKeySet("{F9}","FightOnOff")
HotKeySet("{F10}","ExitApp")
Tooltip("F9 = Fight, F10 = Exit bot", 0, 0)
Dim $fight = False
WinActivate ( "Mabinogi : Ancient Secrets of Irinid" )
Func FightOnOff()
If $fight = False Then
$fight = True
ToolTip("Fighting",0,0)
Else
$fight = False
Tooltip("F9 = Fight, F10 = Exit bot", 0, 0)
EndIf
EndFunc
Func ExitApp()
Exit
EndFunc
While True
If $fight = True Then
If Not @error Then
Send("{ctrlDOWN}")
ControlClick("Mabinogi : Ancient Secrets of Irinid", "", "", "", "", "", "")
EndIf
EndIf
Sleep(500)
WEnd
|
and
Code: | HotKeySet("{F9}","FightOnOff")
HotKeySet("{F10}","ExitApp")
Tooltip("F9 = Fight, F10 = Exit bot", 0, 0)
Dim $fight = False
WinActivate ( "Mabinogi : Ancient Secrets of Irinid" )
Func FightOnOff()
If $fight = False Then
$fight = True
ToolTip("Fighting",0,0)
Else
$fight = False
Tooltip("F9 = Fight, F10 = Exit bot", 0, 0)
EndIf
EndFunc
Func ExitApp()
Exit
EndFunc
While True
If $fight = True Then
Dim $cordinates = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0x21140C)
If Not @error Then
ControlClick("Mabinogi : Ancient Secrets of Irinid", "", "", "", "", $cordinates[0], $cordinates[1])
EndIf
EndIf
Sleep(500)
WEnd
|
can you please look over these and explain why they are not working and ways to improve my codes
Edit Had to run game client in vmware than it worked like a charm
|
|