You last visited: Today at 16:30
Advertisement
Help me ,
Discussion on Help me , within the AutoIt forum part of the Coders Den category.
07/11/2011, 12:46
#1
elite*gold: 0
Join Date: Jun 2011
Posts: 38
Received Thanks: 1
Help me ,
Hello every body ,
Today i'm make a bot for a browser game i'm play it .
But when i'm write Hotkeyset("F8", "Exit") to exit the bot doesnt exit .
Help me , And i'm need code to make the bot for 1 program and doesnt take the mouse . ( I'm can Do any thing and the bot is working ) . like the bot of Need for speed world .
Thanks every body .. !
07/11/2011, 13:32
#2
elite*gold: 0
Join Date: Aug 2010
Posts: 880
Received Thanks: 113
Hotkeyset("{F8}", "_Exit")
func _Exit()
exit
endfunc
07/11/2011, 13:34
#3
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Code:
HotKeySet("[COLOR="Red"]{[/COLOR]F8[COLOR="Red"]}[/COLOR]", "_Exit")
07/11/2011, 15:26
#4
elite*gold: 0
Join Date: Jun 2011
Posts: 38
Received Thanks: 1
Thanks worked .. !
but is there a code like nfsworld bot ( I'm open the bot and can use the mouse ) .
thanks again
07/11/2011, 16:17
#5
elite*gold: 0
Join Date: Aug 2010
Posts: 880
Received Thanks: 113
Quote:
Originally Posted by
nfswor
Thanks worked .. !
but is there a code like nfsworld bot ( I'm open the bot and can use the mouse ) .
thanks again
the code is controlsend() search in helpfile...
example: ControlClick("Windowname", "", "", "Left", 1, 401, 466)
ControlSend("Windowname", "", "", "Text to send")
07/11/2011, 17:35
#6
elite*gold: 0
Join Date: Jun 2011
Posts: 38
Received Thanks: 1
Thanks but am not understand ..
am try it and not work
can you example more ?
and thats my bot
PHP Code:
global $Paused
global $cnt = 1
global $z = 0
HotKeySet ( "{F9}" , "Terminate" )
HotKeySet ( "{F7}" , "TogglePause" )
$timeInput = InputBox ( "Timer Settings" , "How many second delay?" , "3" )
$time = $timeInput * 1000
Sleep ( 3000 )
MouseClick ( "" , 1271 , 387 , 1 , 0 )
Sleep ( 5000 )
While 1
MouseClick ( "" , 253 , 191 , 1 , 0 )
Sleep ( 1000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 536 , 346 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 464 , 156 , 1 , 0 )
Sleep ( 1000 )
MouseClick ( "" , 358 , 117 , 1 , 0 )
Sleep ( 1000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 98 , 55 , 1 , 0 )
Sleep ( 5000 )
MouseClick ( "" , 88 , 118 , 1 , 0 )
Sleep ( 1000 )
WEnd
Func TogglePause () ; the pause function
$Paused = NOT $Paused
While $Paused
ToolTip ( 'Please press "F8" to resume!' , 600 , 200 , "" , 1 , 2 )
sleep ( 1000 )
WEnd
ToolTip ( "" )
EndFunc
Func Terminate () ; the exit function
Exit 0
EndFunc
The bot work but need to doesnt take the mouse ..
thank you ..!
07/11/2011, 17:43
#7
elite*gold: 0
Join Date: Aug 2010
Posts: 880
Received Thanks: 113
Do it like:
PHP Code:
global $Paused
global $cnt = 1
global $z = 0
HotKeySet ( "{F9}" , "Terminate" )
HotKeySet ( "{F7}" , "TogglePause" )
$timeInput = InputBox ( "Timer Settings" , "How many second delay?" , "3" )
$time = $timeInput * 1000
Sleep ( 3000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 1271 , 387 )
Sleep ( 5000 )
While 1
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 253 , 191 )
Sleep ( 1000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 536 , 346 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 464 , 156 )
Sleep ( 1000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 358 , 117 )
Sleep ( 1000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 98 , 55 )
Sleep ( 5000 )
ControlClick ( "Windowname" , "" , "" , "left" , 1 , 88 , 118 )
Sleep ( 1000 )
WEnd
Func TogglePause () ; the pause function
$Paused = NOT $Paused
While $Paused
ToolTip ( 'Please press "F8" to resume!' , 600 , 200 , "" , 1 , 2 )
sleep ( 1000 )
WEnd
ToolTip ( "" )
EndFunc
Func Terminate () ; the exit function
Exit 0
EndFunc
or make a for-loop
example:
$howmanyloops= 5
For $i=0 to $howmanyloops
ControlClick("Windowname", "", "", "left", 1, 98,55)
sleep(5000)
next
07/11/2011, 18:25
#8
elite*gold: 0
Join Date: Jun 2011
Posts: 38
Received Thanks: 1
Thanks for help me , and give me from your time ..
$howmanyloops= 5
For $i=0 to $howmanyloops
ControlClick("Windowname", "", "", "left", 1, 98,55)
sleep(5000)
next
but the controlclick() .. . not work
See thats bot :-
not work only on the game ( Need For speed world ) and i can use it and use the mouse .
Like that i want to make on the game browser .
thank you man .. !
07/11/2011, 18:34
#9
elite*gold: 0
Join Date: Aug 2010
Posts: 880
Received Thanks: 113
Quote:
Originally Posted by
nfswor
Thanks for help me , and give me from your time ..
$howmanyloops= 5
For $i=0 to $howmanyloops
ControlClick("Windowname", "", "", "left", 1, 98,55)
sleep(5000)
next
but the controlclick() .. . not work
See thats bot :-
not work only on the game ( Need For speed world ) and i can use it and use the mouse .
Like that i want to make on the game browser .
thank you man .. !
Did you changed the ControlClick("
Windowname ", "", "", "left", 1, 98,55) the "Windowname" to the name of the window from NFSW???
07/11/2011, 18:38
#10
elite*gold: 0
Join Date: Jun 2011
Posts: 38
Received Thanks: 1
yes , i'm use mozilla firefox but the windows name is words in other language and - Mozilla Firefox
and when i'm write the words in the autoit it be ?????? ??? ????
07/12/2011, 10:27
#11
elite*gold: 0
Join Date: Jun 2011
Posts: 38
Received Thanks: 1
am copy the title from Autoit info ..
and paste it , but not work .
Code:
>>>> Window <<<<
Title: حياة قاتل مأجور - الجرائم - Mozilla Firefox
Class: MozillaUIWindowClass
Position: -8, -8
Size: 1296, 1010
Style: 0x15CF0000
ExStyle: 0x00000100
Handle: 0x00B60230
>>>> Control <<<<
Class: MozillaWindowClass
Instance: 2
ClassnameNN: MozillaWindowClass2
Name:
Advanced (Class): [CLASS:MozillaWindowClass; INSTANCE:2]
ID:
Text:
Position: 0, 109
Size: 1280, 841
ControlClick Coords: 447, 669
Style: 0x56000000
ExStyle: 0x00000000
Handle: 0x0037029C
>>>> Mouse <<<<
Position: 447, 800
Cursor ID: 0
Color: 0x000000
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
>>>> Hidden Text <<<<
IDM DwnlPanelCtrl Window
07/12/2011, 11:01
#12
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,324
All times are GMT +2. The time now is 16:31 .