Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Func does not work when i press a button


  • This topic is locked This topic is locked
2 replies to this topic

#1 xXxElevenxXx

xXxElevenxXx

    Seeker

  • Active Members
  • 8 posts

Posted 18 February 2010 - 05:55 PM

i don't kown why this func does not work
if i fill it in like this:
Posted Image
then it works fine
but if i wan't to use the . . . button and select a file then it won't work... help!
AutoIt         
#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








#2 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 19,892 posts

Posted 18 February 2010 - 06:01 PM

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?

M23

Edit:

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 by Melba23, 18 February 2010 - 06:11 PM.

StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#3 Jos

Jos

    oh joy ...

  • Developers
  • 22,535 posts

Posted 18 February 2010 - 06:29 PM

see other thread

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users