Reinn Posted June 7, 2009 Posted June 7, 2009 expandcollapse popup;========================================================= ;Reinn's 'Shooting gallery' bot ;========================================================= ;Version 1.0 ;========================================================= ;Made by: ;Reinn at www.Fleud.com ;Reinn at www.Autoitscript.com ;FleudReinn at www.Youtube.com ;========================================================= ;www.Fleud.com for updates ;========================================================= ;Credits to: Fleud.com, AutoItscript.com for making AutoIt ;========================================================= ;Extra credits to: MDiesel, More to come! ;========================================================= #include <GUIConstants.au3> HotKeySet('{F8}', 'Search') HotKeySet('{ESC}', 'Stop') $Form1_1 = GUICreate("Reinn's 'Shooting gallery' bot", 354, 179, 193, 125) $Combo1 = GUICtrlCreateCombo("1280 * 1024", 120, 120, 113, 25) GUICtrlSetData(-1, "1024 * 768") $Pic1 = GUICtrlCreatePic("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", 0, 0, 353, 177) GUISetState(@SW_SHOW) $Left=0 $Top=0 $Right=1000 $Bottom=800 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Dim $Count = 0 Func Search() For $Count = 1 To 5 $Search=PixelSearch ($Left,$Top,$Right,$Bottom,0xFF0000,5,2) If Not @error Then MouseClick ("Left",$Search[0],$Search[1],1,10) Sleep(20) Next If GuiCtrlRead($Combo1) = "1024 * 768" Then MouseClick("Left",598,549,1) ElseIf GuiCtrlRead($Combo1) = "1280 * 1024" Then MouseClick("left",754,716,1) EndIf Search() EndFunc Func Stop() $Visit = MsgBox(0x44, "Reinn's Screenshot Tool", "Would you like to go to Fleud.com now?") If ( $Visit = 6 ) Then ShellExecute("http://www.Fleud.com/") Else EndIf Exit EndFuncoÝ÷ ØuëaƧv+p¢¹,~æx§¢w¨~l®'§vËn®x¢xv¬mz÷§¶êç¢r$-êk¡¹^+"Ø^B*º^jëh×6$Pic1 = GUICtrlCreatePic("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", 0, 0, 353, 177)
martin Posted June 7, 2009 Posted June 7, 2009 I'm not sure which problem you mean but it looks like you need to use FileInstall perhaps to add the jpg and @ScriptDir instead of D:\.... etc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Reinn Posted June 7, 2009 Author Posted June 7, 2009 I'm not sure which problem you mean but it looks like you need to use FileInstall perhaps to add the jpg and @ScriptDir instead of D:\.... etcOkey, I've encountered a problem.. $Pic = FileInstall("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", @ScriptDir) $Pic1 = GuiCtrlCreatePic(@ScriptDir & "GUI.jpg", 0, 0, 353, 177) That's what it is now, and the GUI is gone completely now...
martin Posted June 7, 2009 Posted June 7, 2009 Okey, I've encountered a problem.. $Pic = FileInstall("D:\Users\Jan\Pictures\Photoshop\GUI.jpg", @ScriptDir) $Pic1 = GuiCtrlCreatePic(@ScriptDir & "GUI.jpg", 0, 0, 353, 177) That's what it is now, and the GUI is gone completely now... Maybe because it should be $Pic1 = GuiCtrlCreatePic(@ScriptDir & "\GUI.jpg", 0, 0, 353, 177) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Reinn Posted June 7, 2009 Author Posted June 7, 2009 I made it $Pic1 = GUICtrlCreatePic(@ScriptDir & "\GUI.jpg", 0, 0, 353, 177) And I included the GUI.jpg in the script folder, and it works.
Zedna Posted June 7, 2009 Posted June 7, 2009 You may also look at my Resources UDFhttp://www.autoitscript.com/forum/index.php?showtopic=51103 Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now