Sebix Posted September 24, 2012 Posted September 24, 2012 (edited) Hi folks, I'm new to the forum. I am creating a "FarmBot", which has a GUI, where you can select the map and playtime. This is my first file created by AutoIt, so it is not very complex, this theory would. Open button, select playtime, select map, give Start. Pressing Start opens the game window, F5 is pushed (key that starts the game), is generates Sleep 20 seconds to load the game, it opens another program which serves to teleport in the game. The bot it will also do is place the coordinates of the positions within the game to teleport to certain beneficial points. After that will generate Sleep 21 minutes, and then will start again from 0, omitting the step of opening the program teleportation. This is the code: #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <GuiComboBoxEx.au3> GuiCreate("Farmbot S4 League por XxSsebasSxX",245,200) GuiSetState(@SW_SHOW) GuiCtrlCreateGroup("Tiempo", 20, 15, 90, 100) $Tiempo = GuiCtrlCreateCombo("0", 30, 40, 70, 200, $CBS_DROPDOWNLIST) GuiCtrlSetData(-1, "6|11|16|21|31") GUICtrlCreateInput("", 30, 75, 70, 25, $ES_NUMBER) GuiCtrlCreateGroup("Mapa", 125, 15, 100, 100) $Skyline = GUICtrlCreateRadio("Skyline", 135, 40) $Station2 = GUICtrlCreateRadio("Station2", 135, 60) $Start = GuiCtrlCreateButton("Start", 80, 130, 70, 25) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Start _Delay() EndSwitch WEnd $Tiempo = $Tiempo * 60000 Func _Delay() Sleep(GUICtrlRead($Tiempo)) EndFunc I tried in many ways, with if, using Select, using loops, but none seemed to work. At this time the bot just want to prove that, by pressing START, Sleep is generated from the number of minutes that is in the Combobox. So the multiplication "$ Time * 60000", because if the user selects 6, if this number is placed in the function, then the amount of sleep time would be 0.01. By doing 6 * 60000 = 360000 = 6 minutes. Anyway, I hope to explain to me how I can solve and how failure. I await your reply, thanks in advance. Edited September 24, 2012 by Sebix
Venix Posted September 24, 2012 Posted September 24, 2012 (edited) I am creating a "FarmBot", which has a GUI, where you can select the map and playtime.I beleive you have missed the rules. Edited September 24, 2012 by Venix
Moderators Melba23 Posted September 24, 2012 Moderators Posted September 24, 2012 Sebix,Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum Rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts