Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 08:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



help me please

Discussion on help me please within the AutoIt forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2008
Posts: 18
Received Thanks: 0
help me please

I am making a bot for pretty much any role playing game that I play and so I am trying to add a auto tab feature to my current bot, all my current bot does is just use any skill that i tell it to use.
Im very new with using auto it and so when you suggest something, you might also want to tell me where i should put it in my coding. otherwise i will not know where to put it

Edit:
Also if there is a way, I woukd like to add it to the GUI as an option that coukd be turned on and off. But I dont know if tht could be done. So if it cant thanks anyways.


Code:
#include <GUIConstantsEx.au3>

GUICreate("Jaret's Bot", 335, 200)

GUICtrlCreateLabel("Skill 1", 8, 10)
$key1 = GUICtrlCreateInput("", 40, 8, 50)
GUICtrlCreateLabel("Delay", 8, 44)
$time1 = GUICtrlCreateInput("", 40,40, 50)
GUICtrlCreateLabel("Skill 2", 8, 74)
$key2 = GUICtrlCreateInput("", 40,72, 50)
GUICtrlCreateLabel("Delay", 8, 104)
$time2 = GUICtrlCreateInput("", 40,104, 50)

$startbutton = GUICtrlCreateButton("Start", 190, 8, 60) 

GUISetState(@SW_SHOW)

HotKeySet("{END}", "close") 

While 1
		$msg = GUIGetMsg()
	
		Select
		
				Case $msg = $startbutton
								$send1 = GUICtrlRead($key1)
								$sleep1 = GUICtrlRead($time1)
								$send2 = GUICtrlRead($key2)
								$sleep2 = GUICtrlRead($time2)
						While 1
								Send($send1)
								Sleep($sleep1)
								
								Send($send2)
								Sleep($sleep2)
						WEnd
				Case $msg = $GUI_EVENT_CLOSE
						GUIDelete()
						ExitLoop
						Exit
		
		EndSelect
			
WEnd
		
Func close() 
	
	Exit
	
EndFunc
nobleman07 is offline  
Old 09/13/2011, 22:05   #2

 
FichteFoll's Avatar
 
elite*gold: 237
Join Date: Sep 2008
Posts: 4,476
Received Thanks: 4,587
Actually, I don't understand what you are asking for.
You want something with "auto tab"? What do you mean by that? Do you want do press the tab-key or do you want to alt-tab out of the window?
FichteFoll is offline  
Old 09/14/2011, 05:54   #3
 
elite*gold: 0
Join Date: Jan 2008
Posts: 18
Received Thanks: 0
Quote:
Originally Posted by FichteFoll View Post
Actually, I don't understand what you are asking for.
You want something with "auto tab"? What do you mean by that? Do you want do press the tab-key or do you want to alt-tab out of the window?
i would like it to hit the tab key so that it will switch targets.
nobleman07 is offline  
Old 09/15/2011, 17:08   #4

 
FichteFoll's Avatar
 
elite*gold: 237
Join Date: Sep 2008
Posts: 4,476
Received Thanks: 4,587
Send("{TAB}")

See the documentation for "Send" for more information or the next time you don't know a key.
FichteFoll is offline  
Old 09/16/2011, 05:06   #5
 
elite*gold: 0
Join Date: Jan 2008
Posts: 18
Received Thanks: 0
i have tried that, but i guess i put it in the wrong place and so i dont know where to put it so that it will do it after my skills have been used.

Quote:
Originally Posted by FichteFoll View Post
Send("{TAB}")

See the documentation for "Send" for more information or the next time you don't know a key.
like is there a way for me to set my skills up on a loop for example like 30 seconds then have it hit the tab key, then loop back to my skills then tab again?
nobleman07 is offline  
Old 09/16/2011, 14:19   #6

 
FichteFoll's Avatar
 
elite*gold: 237
Join Date: Sep 2008
Posts: 4,476
Received Thanks: 4,587
If you'd want to have it exactly 30 seconds (or at least independet of your input) your should use TimerInit and TimerDiff.

Like so:
PHP Code:
$timer TimerInit()
While 
1
    Send
($send1)
    
Sleep($sleep1)

    
Send($send2)
    
Sleep($sleep2)

    If 
TimerDiff($timer) > 30 1000 Then
        Send
("{TAB}")
        
$timer TimerInit()
    EndIf
WEnd 
FichteFoll is offline  
Old 09/20/2011, 05:46   #7
 
elite*gold: 0
Join Date: Jan 2008
Posts: 18
Received Thanks: 0
Quote:
Originally Posted by FichteFoll View Post
If you'd want to have it exactly 30 seconds (or at least independet of your input) your should use TimerInit and TimerDiff.

Like so:
PHP Code:
$timer TimerInit()
While 
1
    Send
($send1)
    
Sleep($sleep1)

    
Send($send2)
    
Sleep($sleep2)

    If 
TimerDiff($timer) > 30 1000 Then
        Send
("{TAB}")
        
$timer TimerInit()
    EndIf
WEnd 
thank you, i am going to try and make it set up to where i can add it to my GUI so i dont have to manually go into the codeing for the tab time. if you have any advice it would be much appreciated
nobleman07 is offline  
Old 09/22/2011, 12:24   #8

 
Adroxxx's Avatar
 
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,324
Adroxxx is offline  
Closed Thread




All times are GMT +1. The time now is 08:45.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.