|
You last visited: Today at 03:45
Advertisement
AutoIt Help Plz
Discussion on AutoIt Help Plz within the AutoIt forum part of the Coders Den category.
02/23/2011, 08:49
|
#1
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
AutoIt Help Plz
Hi i am new to autoit v3 and would like to lern it a bit more to know...
i have made some basic scripts (ip feinder, text maker and such)
but to get to know more about Pixel usege i would like to make a small bot...
i thort about making a bot to run Minesweeper and feind all the mines...
but there is my problem i'm not sure how to make all the things work...
i know there are many "minesweeper bots" out there so if some one could make/send me a turturial on how to make a minesweeper bot i think i can figure out how to use it in another game later on...
is there some one out there willing to help me with this?!?
|
|
|
02/23/2011, 11:59
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 557
Received Thanks: 160
|
go on
fill in Minesweeper Cheat Engine
wait until your slow pc loaded it
click on video
start video
think about it
eat something
go on the toilet
|
|
|
02/23/2011, 12:08
|
#3
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by Jonas_93
go on
fill in Minesweeper Cheat Engine
wait until your slow pc loaded it
click on video
start video
think about it
eat something
go on the toilet
|
oki that is just rude... you think i have not been on Youtube looking for such a thing?!? i have i could not feind it...
so if you can send a link to such film it would be helpfull otherwise not...
Edit: might have found some in german... but i am not that good at german so i cant understand it... :S
|
|
|
02/23/2011, 15:37
|
#4
|
elite*gold: 52
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
|
I would say it's better to lear the basics before you do such bots those work with the memory.
|
|
|
02/23/2011, 17:03
|
#5
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by BlackHybrid
I would say it's better to lear the basics before you do such bots those work with the memory.
|
oki thanks... have just made the last tuches on my RS FM Bot... it works fine...
just have one problem... :S
how do i get it to work in the GUI so that it can work without using "my" mouse so that i can still write in the script or make other script while the bot is running...?
|
|
|
02/23/2011, 17:14
|
#6
|
elite*gold: 52
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
|
In this case you have to work with the memory or if you dont use pixelsearch or any else you can use the control commands (controlsend/controlclick) or the UDF from KillerDeluxe  . With this UDF you can simulate the click with a dll. This woud work in the most games.
|
|
|
02/23/2011, 17:30
|
#7
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by BlackHybrid
In this case you have to work with the memory or if you dont use pixelsearch or any else you can use the control commands (controlsend/controlclick) or the UDF from KillerDeluxe  . With this UDF you can simulate the click with a dll. This woud work in the most games.
|
thanks a bunch...
i'll look this up and see if i can make it work...
just if it is easier for you to help if you know what script i have made i post it here...
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
HotKeySet("{ESC}","Terminate")
$Form1 = GUICreate("RS FM Bot", 222, 99, 192, 124)
$Label1 = GUICtrlCreateLabel("RuneScape Firemaking Bot", 48, 8, 150, 17)
$Button1 = GUICtrlCreateButton("Start", 64, 40, 89, 33, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If $nMsg = $Button1 Then Button1()
WEnd
Func Button1()
WinActivate("RuneScape - The Number 1 Free Multiplayer Game - Mozilla Firefox")
Sleep(1000)
MouseClick("Left",1045,189)
Sleep(500)
Send("{UP down}")
Sleep(2000)
Send("{UP up}")
Sleep(500)
MouseClick("Left",992,186)
Sleep(500)
MouseClick("Right",992,186)
Sleep(500)
MouseClick("Left",987,229)
Sleep(500)
MouseClick("Left",880,727)
Sleep(1000)
MouseClick("Right",1090,505) ;Glory
Sleep(500)
MouseClick("Left",1070,549) ;Tele
Sleep(10000)
MouseClick("Left",849,725) ;Inventory
Sleep(2000)
MouseClick("Left",860,658) ;Walk
Sleep(5000)
MouseClick("Left",813,388) ;Walk
Sleep(5000)
MouseClick("Right",762,447) ;Feind Banker
Sleep(500)
MouseClick("Left",751,492) ;Bank Banker
Sleep(2000)
MouseClick("Left",822,540) ;Empty Inventory In To Bank
Sleep(2000)
MouseClick("Left",469,239)
Sleep(1000)
MouseClick("Left",911,277)
Sleep(2000)
MouseClick("Left",650,324) ;Take Ligther
Sleep(1000)
MouseClick("Left",910,207)
Sleep(1000)
While 1
MouseClick("Right",762,447) ;bank
Sleep(1000)
MouseClick("Left",751,492) ;Bank Banker
Sleep(2000)
MouseClick("Right",776,327) ;Logs
Sleep(2000)
MouseClick("Left",769,452) ;Take Logs
Sleep(2000)
MouseClick("Left",910,207) ;Close Bank
Sleep(500)
MouseClick("Left",885,209)
Sleep(6000)
MouseClick("Left",1174,348)
Sleep(6000)
MouseClick("Left",681,428)
Sleep(4000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,466) ;Log1
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,466) ;Log2
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,466)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1030,503)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,503)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,503)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,503)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1030,540)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,540)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,540)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,540)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1030,574)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,574)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,574)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,574)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1030,613)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,613)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,613)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,613)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1030,648)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,648)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,648)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,648)
SLeep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1030,685)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1072,685)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1116,685)
Sleep(3000)
MouseClick("Left",1030,466) ;Tinderbox
Sleep(500)
MouseClick("Left",1159,685)
Sleep(4000)
MouseClick("Left",872,678)
Sleep(5000)
MouseClick("Left",633,676)
Sleep(5000)
MouseClick("Left",763,616)
Sleep(5000)
MouseClick("Left",819,389)
Sleep(5000)
WEnd
EndFunc
Func Terminate()
MsgBox(0,"Error","Bot Has Been Terminatet")
Exit
EndFunc
it works fine for me... tho not many els can use it cuz it is made for my RS setup... :P
|
|
|
02/23/2011, 17:59
|
#8
|
elite*gold: 52
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
|
Just take a look at the page i posted. You have to put the file you can download there in the include folder of your autoit dir. The command can you see on the page. And dont forget to include the UDF.
|
|
|
02/23/2011, 18:01
|
#9
|
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,324
|
Please use, [CODE] or [PHP] Tags for your code snippets.
|
|
|
02/23/2011, 18:07
|
#10
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by BlackHybrid
Just take a look at the page i posted. You have to put the file you can download there in the include folder of your autoit dir. The command can you see on the page. And dont forget to include the UDF.
|
:S german...
now just cuz i see many of my questions have an anwser in here but all in german... :S is there a English site like this one?!?
|
|
|
02/23/2011, 18:14
|
#11
|
elite*gold: 52
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
|
Those german words are useless
At first you get the handle of the window that the dll knows in wich window the keys have to be sent.
PHP Code:
$hWnd = WinGetHandle("Window name of the game")
And use this instead of send
PHP Code:
_PostMessage_Click($hWnd, 100, 100, "left")
The command _postmessage is deffined in the UDF. In the UDF the dll get called that is responsible for sendink keys or do mouseclicks etc.
|
|
|
02/23/2011, 18:34
|
#12
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by BlackHybrid
Those german words are useless
At first you get the handle of the window that the dll knows in wich window the keys have to be sent.
PHP Code:
$hWnd = WinGetHandle("Window name of the game")
And use this instead of send
PHP Code:
_PostMessage_Click($hWnd, 100, 100, "left")
The command _postmessage is deffined in the UDF. In the UDF the dll get called that is responsible for sendink keys or do mouseclicks etc.
|
oki the way i understand it i have to make it as such:
PHP Code:
Func Button1()
$hWnd = WinGetHandle("RuneScape - The Number 1 Free Multiplayer Game - Mozilla Firefox")
Sleep(1000)
_PostMessage_Click($hWnd, 1045, 189, "left")
Sleep(500)
Send("{UP down}")
Sleep(2000)
Send("{UP up}")
Sleep(500)
MouseClick("Left",992,186)
Sleep(500)
MouseClick("Right",992,186)
PHP Code:
(the _PostMessage_Click($hWnd, 100, 100, "left") will be insted og MouseClick() )
is this right?!?
and what should i do with the 3 files i have downloaded?!? just in the same folder as the script?!?
|
|
|
02/23/2011, 18:41
|
#13
|
elite*gold: 52
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
|
1. Yes thats right
2. Go in your AutoIt folder where you installed it and put those files in the Include folder
And dont forget to include it with
PHP Code:
#include <PostMessage.au3>
PS: I'm away now for 1-2 hours
PS2: If I help you you can give me a Thanks at right - bottom of my post
|
|
|
02/23/2011, 18:43
|
#14
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by BlackHybrid
1. Yes thats right
2. Go in your AutoIt folder where you installed it and put those files in the Include folder
And dont forget to include it with
PHP Code:
#include <PostMessage.au3>
PS: I'm away now for 1-2 hours
PS2: If I help you you can give me a thx at right - bottom of my post
|
thanks so much... you just made my day...
|
|
|
02/23/2011, 19:08
|
#15
|
elite*gold: 0
Join Date: Jun 2010
Posts: 17
Received Thanks: 0
|
hmmm cant get it to do anything?
I made the first part of the script but it just dont do anything? :S
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <PostMessage.au3>
#Region ### START Koda GUI section ### Form=
HotKeySet("{ESC}","Terminate")
$Form1 = GUICreate("RS FM Bot", 222, 99, 192, 124)
$Label1 = GUICtrlCreateLabel("RuneScape Firemaking Bot", 48, 8, 150, 17)
$Button1 = GUICtrlCreateButton("Start", 64, 40, 89, 33, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If $nMsg = $Button1 Then Button1()
WEnd
Func Button1()
$hWnd = WinGetHandle("RuneScape - The Number 1 Free Multiplayer Game - Mozilla Firefox")
Sleep(1000)
_PostMessage_Click($hWnd,1045,189,"Left")
Sleep(500)
_PostMessage_Send($hWnd,"{UP down}")
Sleep(2000)
_PostMessage_Send($hWnd,"{UP up}")
Sleep(500)
_PostMessage_Click($hWnd,992,186,"Left")
dunno if this should work aswell??? should it?!?
PHP Code:
_PostMessage_Send($hWnd,"{UP up}")
|
|
|
All times are GMT +1. The time now is 03:45.
|
|