What is autoit?
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying “runtimes” required!
AHK vs Autoit:
This all comes down to what you feel comfortable with , i prefer autoit because it is more structured and and therefor easy to understand for beginners and advance users alike,
autoit came first , AHK is a branch off autoits sourcecode. alot of people here prefer AHK but i bet you never even heard of autoit before.
Differences:
AHK
Autoit:Code:^z:: mousegetpos , MouseX,MouseY PixelGetColor,color, %MouseX%,%MouseY% msgbox %color% return
this is a function to grab the color at mouse pointer they both do the same things , as you can see in autoit its a bit more lines of code but i am also displaying it via a messagebox window and not a tooltip , on the flip side its easier to understand and the syntax is well laid out. On the other Hand AHK has as you can see has fewer lines of code but is "sloppy" and the syntax has more of a "real" programming language feel to it.Code:hotkeyset("{F1}","GetPixelPos") $G = "Found it!" $B = "Nope!" $P = 0 Func GetPixelPos() $XY = mousegetpos() $Sum = PixelGetColor($XY[0],$XY[1]) $Var = "0x" & Hex($Sum,6) if $Var = "0xED1C24" Then msgbox($P,"",$G) Else msgbox($P,"",$B) EndIf EndFunc
Autoit
AHK:Code:$W = _IECreateEmbedded() GUICreate("",812, 619) GUICtrlCreateObj($W, -1, -1, 812, 619) _IENavigate($W, "about:blank") _IENavigate($W "") GUISetState(@SW_SHOW)
this code embeds IE Into a gui , granted the AHK Version written by the great 7USBBALL has controls in it , it is still a fair be more complicated then just using autoit to embed the control.Code:lbbHandle := DllCall("LoadLibrary", "str", "lbbrowse3.dll") ; Loads the dll Gui, Add, Edit, x5 y5 w380 h20 vUrl, truecheaters.com ;Creates the Edit box in the Gui, Notice "vUrl", v is for variable, Url is the variable name to store the data Gui, Add, Button, x+5 w100 h20 gNav, Navigate ;The button to navigate Gui, Show, w500 h400 Center, Example ;Create the GUI WinGet, mainGuiHandle, ID, Example ;Get the Windows ID to create the browser ;Now to call lbbrowse3.dll to create the browser, notice mainGuiHandle is used, the 5 is the x start point, 35 is the y start point, 490 is the width and 380 is the height ;Truecheaters.com is the Url to Load up ;This is a dll so you will have to declare the variables types. Int for Integer, Str for string. DllCall("lbbrowse3\CreateBrowser", "uint", mainGuiHandle, "Int", "5", "Int", "35", "Int", "490", "Int", "380", "Str", "Truecheaters.com") return Nav: Gui, Submit, Nohide ;Submits the Values in the editbox we made, the Text you input will be stored in the variable Url ;Msgbox % "Navigating to " Url DllCall("lbbrowse3\Navigate", "str", Url) ;Navigate function in the .dll , Str declares the variables as a string, and Url is the address we got from the user. return
I AM STILL ADDING MORE STUFF ITS JUST BED TIME , I PLAN ON ADDING FULL TUTS THIS IS JUST A QUICK AN DIRTY INTRODUCTION, THE TUTS WILL BE MORE CLEANER.


LinkBack URL
About LinkBacks
Reply With Quote