Sign in to follow this  
Followers 0

Func does not work when i press a button

3 posts in this topic

Posted

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!

#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

Share this post


Link to post
Share on other sites



Posted (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?

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

Share this post


Link to post
Share on other sites

Posted

see other thread

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.