View Single Post
Old 06-18-2008, 10:27 AM   #3
bleachofficial
Registered User
 
bleachofficial's Avatar
 
Last Online: 05-29-2009 07:27 AM
Join Date: Jun 2008
Location: Thank's-City's
Posts: 39
Rep Power: 0
Rep Points: 10
bleachofficial is on a distinguished road
Feedback: (0)
Points: 6,475.63
Bank: 0.00
Total Points: 6,475.63
Honoured... - bleachofficial 
Childhood Cancer - bleachofficial 
Wink Re: How To Create Ur Own Bot (autoit)

Quote:
Originally Posted by ChaosPower View Post
will this work on shortcut keys? hehe just curious.
.... yup! u can do anything... mouse movement,pixel
searching,mouseclicking..and the most important .. is sending key stroke

example: [AutoIT]


Quote:
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
Local $filemenu, $fileitem, $recentfilesmenu, $separator1
Local $exititem, $helpmenu, $aboutitem, $okbutton, $cancelbutton
Local $msg, $file
#forceref $separator1

GUICreate("GUI menu", 300, 200)

$filemenu = GUICtrlCreateMenu("File")
$fileitem = GUICtrlCreateMenuItem("Open...", $filemenu)
$recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu)
$separator1 = GUICtrlCreateMenuItem("", $filemenu)
$exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
$helpmenu = GUICtrlCreateMenu("?")
$aboutitem = GUICtrlCreateMenuItem("About", $helpmenu)

$okbutton = GUICtrlCreateButton("OK", 50, 130, 70, 20)
$okbutton = GUICtrlCreateRadio("Start",30, 90, 100, 10)
$cancelbutton = GUICtrlCreateButton("Cancel", 180, 130, 70, 20)

GUISetState()

While 1
$msg = GUIGetMsg()


Select
Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton
ExitLoop

Case $msg = $okbutton
MsgBox(0, "Run", "Run?")
MouseMove(38,15,20)
MouseClick("Left",38,15,2,3)
WinWait("My Computer")
WinActivate("My Computer","Shared Documents")
MouseClick("Left","525","150",2,3)
WinActivate("Shared Documents","Manga-")
MouseClick("Left",243,177,2,3)
WinActivate("Manga-","Naruto")
MouseClick("Left",244,120,2,3)
WinActive("Naruto")
WinActivate("Naruto","CabinetWClass")
MouseClickDrag("Left",1013,301,1015,523)
WinActivate("Naruto","403")
MouseClick("Left",248,738,2,3)
WinActivate("403","01")
MouseClick("Left",271,677,2,6)

ExitLoop

Case $msg = $fileitem
$file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")
If @error <> 1 Then GUICtrlCreateMenuItem($file, $recentfilesmenu)

Case $msg = $exititem
ExitLoop

Case $msg = $okbutton
MsgBox(0, "Click", "You clicked OK!")

Case $msg = $aboutitem
MsgBox(0, "About", "GUI Menu Test")
EndSelect
WEnd

GUIDelete()

Exit
EndFunc ;==>_Main



*AutoIT will help u in coding by showing u example scripts and script list.
Example: When u write *G* it will show list of available functioning codes just below it , and it easy english makes u can learn programming faster.
bleachofficial is offline