xXxElevenxXx Posted February 18, 2010 Posted February 18, 2010 i don't kown why this func does not workif i fill it in like this:then it works finebut if i wan't to use the . . . button and select a file then it won't work... help!expandcollapse popup#include <GuiConstantsEx.au3> Opt('MustDeclareVars', 1) Opt("GUICoordMode", 0) Global $profile_name, $Information, $Button_3, $Button_6, $Button_7, $msg, $GUI2, $Provincie[7], $i, $n, $p, $sTmpFile, $Locations[7] Add() Func Add() $GUI2 = GUICreate("Add profile", 495, 237) GUICtrlCreateLabel("Profile Name:", 18, 18) $profile_name = GuiCtrlCreateInput("", 70, -2, 200, 20) GuiCtrlCreateGroup("Locations Settings",-76,25,473,52) GUICtrlCreateLabel("Path:", 19, 21) $Locations = GuiCtrlCreateInput(IniRead("Settings.ini", "Locations", "Path", ""), 30, -2, 285, 20) GuiCtrlCreateButton("Auto Detection", 323, 0, 87, 20) $Button_6 = GuiCtrlCreateButton("...", -33, 0, 27, 20) GuiCtrlCreateGroup("Bot Settings",-339,45,474,93) GUICtrlCreateLabel("Account name:", 19, 21) GUICtrlCreateLabel("Provincie:", 300, 0) $Provincie[1] = GuiCtrlCreateRadio("1", 55, -3, 30) GUICtrlSetState($Provincie[1], $GUI_CHECKED) $Provincie[2] = GuiCtrlCreateRadio("2", 30, 0, 30) $Provincie[3] = GuiCtrlCreateRadio("3", -30, 20, 30) $Provincie[4] = GuiCtrlCreateRadio("4", 30, 0, 30) $Provincie[5] = GuiCtrlCreateRadio("5", -30, 20, 30) $Provincie[6] = GuiCtrlCreateRadio("6", 30, 0, 30) GUICtrlCreateLabel("Password:", -373, -13) $n = GuiCtrlCreateInput("", 68, -26, 130, 20) $p = GuiCtrlCreateInput("", 0, 24, 130, 20) $Button_7 = GuiCtrlCreateButton("Cancel", 302, 55, 74, 26) $Button_3 = GuiCtrlCreateButton("Ok", -80, 0, 74, 26) GUICtrlCreateLabel("Time:", -278, -29) $Information = GuiCtrlCreateInput(IniRead("Settings.ini", "Information", "Time", ""), 56, -2, 130, 20) GUICtrlCreateLabel("(for all profiles!!)", 135, 3) GUISetState() While 1 $msg = GUIGetMsg($GUI2) Select Case $msg = $GUI_EVENT_CLOSE GUIDelete($GUI2) Return Case $msg = $Button_7 GUIDelete($GUI2) Return Case $msg = $Button_6 $sTmpFile = FileOpenDialog("Select File:", @DesktopDir, "Internet (*.exe)") GUICtrlSetData($Locations, $sTmpFile); GUI will be updated at next iteration $Locations = $sTmpFile Case $msg = $Button_3 $i = IniRead("Settings.ini", "account", "count", "0") $i = $i + 1 IniWrite("Settings.ini", "account", "count", $i) IniWrite("Settings.ini", "Locations", "Path", GUICtrlRead($Locations)) IniWrite("Settings.ini", "Information", "Time", GUICtrlRead($Information)) IniWrite("Settings.ini", "profile", "profilename" & $i, GUICtrlRead($profile_name)) IniWrite("Settings.ini", "account", "Name" & $i, GUICtrlRead($n)) IniWrite("Settings.ini", "account", "Password" & $i, GUICtrlRead($p)) If $Provincie[1] And BitAND(GUICtrlRead($Provincie[1]), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("Settings.ini", "account", "Provincie" & $i, "1") ElseIf $Provincie[2] And BitAND(GUICtrlRead($Provincie[2]), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("Settings.ini", "account", "Provincie" & $i, "2") ElseIf $Provincie[3] And BitAND(GUICtrlRead($Provincie[3]), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("Settings.ini", "account", "Provincie" & $i, "3") ElseIf $Provincie[4] And BitAND(GUICtrlRead($Provincie[4]), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("Settings.ini", "account", "Provincie" & $i, "4") ElseIf $Provincie[5] And BitAND(GUICtrlRead($Provincie[5]), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("Settings.ini", "account", "Provincie" & $i, "5") ElseIf $Provincie[6] And BitAND(GUICtrlRead($Provincie[6]), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("Settings.ini", "account", "Provincie" & $i, "6") EndIf GUIDelete($GUI2) Return EndSelect WEnd EndFunc
Moderators Melba23 Posted February 18, 2010 Moderators Posted February 18, 2010 (edited) xXxElevenxXx,Before we start - what are you trying to bot? You have read the announcement concerning "Game Bots" at the top of the forum I take it?M23Edit:From Imperia Online rules - seems prety clear to me:*It is forbidden to use any type of software that can harm or interfere with the correct functioning of Imperia Online.* It is forbidden to use any bots or other ways of artificial stay online in the game. The same goes for programs that automates the actions of a player outside the mechanisms provided by the in game menu. Using public proxies to play the game is not allowed. Edited February 18, 2010 by Melba23 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
Developers Jos Posted February 18, 2010 Developers Posted February 18, 2010 see other thread SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts