Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


AutoIt Scripting Questions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
akifennec
How do I cheat?
Reputation: 0

Joined: 12 Sep 2009
Posts: 1

PostPosted: Sat Sep 12, 2009 9:10 pm    Post subject: AutoIt Scripting Questions Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites