jerwin Posted July 3, 2008 Share Posted July 3, 2008 SS:can anyone tell me how can i do this???i want to save my account info in the list box so everytime i want to login i just click the account and then start...any comment about this...?? [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
rasim Posted July 3, 2008 Share Posted July 3, 2008 Store your information in file (e.g. info.ini), then when you starting script, read this info and fill your listbox with this info. Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 Store your information in file (e.g. info.ini), then when you starting script, read this info and fill your listbox with this info.ahm can u give me an example for reading the ini???example i go make info in ini how come my script can read it?? and how can my script load/save the ini file??? i wish u can help me thanx..... [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
damian666 Posted July 3, 2008 Share Posted July 3, 2008 read the helpfile man, fileread is the function you are looking for. you can even read it by line number damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 read the helpfile man, fileread is the function you are looking for.you can even read it by line number damian666ow u mean i can use that fileread?? wat about saving???can i put my username and then password and then after i save it it will automatically save i spend all week to search for that code but im so unlucky and noob i cant see it or else my eyes and brain is suck well can u tell me wat i need to do in about saving??then after that i click the username and it will automatically read when i start the program.... [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 (edited) ow u mean i can use that fileread?? wat about saving???can i put my username and then password and then after i save it it will automatically save i spend all week to search for that code but im so unlucky and noob i cant see it or else my eyes and brain is suck well can u tell me wat i need to do in about saving??then after that i click the username and it will automatically read when i start the program.... Naw not FileRead but IniRead() An ini is to save settings, and takes a lot less work then FileRead() Say when u click save button, have it go to a func using: Opt("GUIOnEventMode", 1) and then after your button creation add this: GUICtrlSetOnEvent(-1, "_SaveFunc") Then in Save Func do something like this: Func _SaveFunc() IniWrite(@ScriptDir & "\YourIni.ini", "Section", "SettingName", GUICtrlRead($theinputbox)) EndFunc Now if you need a better example I wouldn't mind showing u a script Edited July 3, 2008 by tlokz Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 (edited) Naw not FileRead but IniRead() An ini is to save settings, and takes a lot less work then FileRead() Say when u click save button, have it go to a func using: Opt("GUIOnEventMode", 1) and then after your button creation add this: GUICtrlSetOnEvent(-1, "_SaveFunc") Then in Save Func do something like this: Func _SaveFunc() IniWrite(@ScriptDir & "\YourIni.ini", "Section", "SettingName", GUICtrlRead($theinputbox)) EndFunc Now if you need a better example I wouldn't mind showing u a script is this ryt sir??? #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) $Form1_1 = GUICreate("ATTO BOT", 420, 548, 193, 115) $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateListView("", 0, 168, 417, 177) $LogIn = GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) $Server = GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Account = GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Password = GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Channel = GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") $Bot = GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Start = GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) $Save = GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_SaveFunc") $Exit = GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUISetState(@SW_SHOW) Func _SaveFunc() IniWrite(@ScriptDir & "\accounts.ini", "Accounts", "Accounts", GUICtrlRead($theinputbox)) EndFunc While 1 $msg = GUIGetMsg() Select Case $msg = $Exit ExitLoop Case $msg = $Start Run ("D:\ATTO618\AutoLogIn\AutoLogIn.exe") EndSelect WEnd Edited July 3, 2008 by jerwin [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
damian666 Posted July 3, 2008 Share Posted July 3, 2008 yes, i agree... iniread is much better for that kind of thing. but it was just a pointer, if you check out fileread, you will get to iniread too thats why i told you that. that script would work man, except i dont seem to find where you will read in the ini? to set the info with, but thats just let out i presume. Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 (edited) guys i got made new GUI here and i need a helpSS:it is possible to all read those function in ini????anyway i try that func and i got error....heres the script....still not perfect i want to go step by step....expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("ATTO BOT", 420, 548, 193, 115) $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateListView("", 0, 168, 417, 177) $LogIn = GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) $Server = GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Account = GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Password = GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Channel = GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") $Bot = GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Start = GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) $Save = GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) $Exit = GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $Exit ExitLoop Case $msg = $Start Run ("D:\ATTO618\AutoLogIn\AutoLogIn.exe") EndSelect WEnd Edited July 3, 2008 by jerwin [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 Yup its possible to save that muttley Try having an oneventwhen it changes save it Or maybe its possible thru GUICtrlRead() Haven't tried just some thoughts, but yes its possible lol Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 Yup its possible to save that muttleyTry having an oneventwhen it changes save it Or maybe its possible thru GUICtrlRead()Haven't tried just some thoughts, but yes its possible lolhow about puting the GUICtrlRead in while statement then making GUICreate(@ScriptDir & "\data")do the info automatically save in ini file???? [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 (edited) Wanna c a good example? Heres ur GUI that will save to an ini and even load up the settings tho ull have to look into how to load dropdown expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market $YourIni = @ScriptDir & "\Testini.ini" If Not FileExists($YourIni) Then _FileCreate($YourIni) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateListView("", 0, 168, 417, 177) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlSetData(-1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlSetData(-1, IniRead($YourIni, "Settings", "Password", "")) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Save") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _Start() EndFunc Func _Save() IniWrite($YourIni, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($YourIni, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($YourIni, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($YourIni, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($YourIni, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($YourIni, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($YourIni, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($YourIni, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($YourIni, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($YourIni, "Settings", "MarketMode", _GUIToIni($Market)) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc ;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc Edit: Since Im bored ill script the save button to save different profiles and and populate the list with them muttley And the drop down list thing Edited July 3, 2008 by tlokz Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 Wanna c a good example? Heres ur GUI that will save to an ini and even load up the settings tho ull have to look into how to load dropdown expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market $YourIni = @ScriptDir & "\Testini.ini" If Not FileExists($YourIni) Then _FileCreate($YourIni) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateListView("", 0, 168, 417, 177) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlSetData(-1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlSetData(-1, IniRead($YourIni, "Settings", "Password", "")) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlSetState(-1, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Save") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _Start() EndFunc Func _Save() IniWrite($YourIni, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($YourIni, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($YourIni, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($YourIni, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($YourIni, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($YourIni, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($YourIni, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($YourIni, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($YourIni, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($YourIni, "Settings", "MarketMode", _GUIToIni($Market)) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc Edit: Since Im bored ill script the save button to save different profiles and and populate the list with them muttley And the drop down list thing waw man this is 100% working dude thanx very much but its is possible that all account info are will be listed in listview???wat i mean for example in listview when i click the username it will execute in the game... it is possible to do that??? [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 Was working on that right now and just finished it I mean it needs to be tweaked becuase it comes up ugly and the save dialog is a GUI since it has to be saved in that folder. But it seems that you have no problem creating a nice GUI muttley So have fun and I would love to help you with anything else... LOL bored expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <ListBoxConstants.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market, $sItems, $Profile $ProfileDirectory = @ScriptDir & "\Profiles" DirCreate($ProfileDirectory) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateList("", 0, 168, 417, 177) GUICtrlSetOnEvent(-1, "_LoadProfile") _GenerateList($ListView1, $ProfileDirectory) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Profile") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _GenerateList($hListToUse, $vDirectoryToSearch) $aFileList = _FileListToArray($vDirectoryToSearch, "*.ini") For $i = 1 To UBound($aFileList) - 1 GUICtrlSetData($hListToUse, $aFileList[$i]) Next EndFunc ;==>_GenerateList Func _LoadProfile() $aItems = _GUICtrlListBox_GetSelItemsText($ListView1) For $iI = 1 To $aItems[0] $sItems &= $aItems[$iI] Next $YourIni = @ScriptDir & "\Profiles\" & $sItems GUICtrlSetData($Input1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlSetData($Input2, IniRead($YourIni, "Settings", "Password", "")) GUICtrlSetState($AutoLogIn, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) GUICtrlSetState($AutoPots, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) GUICtrlSetState($AutoAttack, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) GUICtrlSetState($AutoLoot, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) GUICtrlSetState($AutoFish, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) GUICtrlSetState($Market, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) EndFunc Func _Start() EndFunc Func _Profile() GUICreate("Form1", 195, 140, 193, 125) GUICtrlCreateLabel("Name your Profile:", 40, 24, 114, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateInput("", 24, 56, 145, 21) GUICtrlCreateButton("Save", 96, 96, 75, 25, 0) GUICtrlSetOnEvent(-1, "_Save") GUISetState(@SW_SHOW) EndFunc Func _Save() GUIDelete("") $temp = GUICtrlRead($Profile) $name = @ScriptDir & "\Profiles\" & $temp & ".ini" IniWrite($name, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($name, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($name, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($name, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($name, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($name, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($name, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($name, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($name, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($name, "Settings", "MarketMode", _GUIToIni($Market)) _GenerateList($ListView1, $ProfileDirectory) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc ;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 Was working on that right now and just finished it I mean it needs to be tweaked becuase it comes up ugly and the save dialog is a GUI since it has to be saved in that folder. But it seems that you have no problem creating a nice GUI muttley So have fun and I would love to help you with anything else... LOL bored expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <ListBoxConstants.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market, $sItems, $Profile $ProfileDirectory = @ScriptDir & "\Profiles" DirCreate($ProfileDirectory) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateList("", 0, 168, 417, 177) GUICtrlSetOnEvent(-1, "_LoadProfile") _GenerateList($ListView1, $ProfileDirectory) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Profile") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _GenerateList($hListToUse, $vDirectoryToSearch) $aFileList = _FileListToArray($vDirectoryToSearch, "*.ini") For $i = 1 To UBound($aFileList) - 1 GUICtrlSetData($hListToUse, $aFileList[$i]) Next EndFunc ;==>_GenerateList Func _LoadProfile() $aItems = _GUICtrlListBox_GetSelItemsText($ListView1) For $iI = 1 To $aItems[0] $sItems &= $aItems[$iI] Next $YourIni = @ScriptDir & "\Profiles\" & $sItems GUICtrlSetData($Input1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlSetData($Input2, IniRead($YourIni, "Settings", "Password", "")) GUICtrlSetState($AutoLogIn, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) GUICtrlSetState($AutoPots, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) GUICtrlSetState($AutoAttack, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) GUICtrlSetState($AutoLoot, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) GUICtrlSetState($AutoFish, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) GUICtrlSetState($Market, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) EndFunc Func _Start() EndFunc Func _Profile() GUICreate("Form1", 195, 140, 193, 125) GUICtrlCreateLabel("Name your Profile:", 40, 24, 114, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateInput("", 24, 56, 145, 21) GUICtrlCreateButton("Save", 96, 96, 75, 25, 0) GUICtrlSetOnEvent(-1, "_Save") GUISetState(@SW_SHOW) EndFunc Func _Save() GUIDelete("") $temp = GUICtrlRead($Profile) $name = @ScriptDir & "\Profiles\" & $temp & ".ini" IniWrite($name, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($name, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($name, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($name, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($name, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($name, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($name, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($name, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($name, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($name, "Settings", "MarketMode", _GUIToIni($Market)) _GenerateList($ListView1, $ProfileDirectory) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc ;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc waaaaaawwww man ur so great weee im so happy wahahhaah anyway can i have request why dont u make it 5 to 10 accounts to be save??becoz it only save 1 account?? [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 hmm thats wierd didnt test it that much but hes a little more updated that does the dropdownboxes as well expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <ListBoxConstants.au3> #include <GUIComboBox.au3> #include <GuiConstantsEx.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market, $sItems, $Profile $ProfileDirectory = @ScriptDir & "\Profiles" DirCreate($ProfileDirectory) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateList("", 0, 168, 417, 177) GUICtrlSetOnEvent(-1, "_LoadProfile") _GenerateList($ListView1, $ProfileDirectory) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Profile") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _GenerateList($hListToUse, $vDirectoryToSearch) $aFileList = _FileListToArray($vDirectoryToSearch, "*.ini") For $i = 1 To UBound($aFileList) - 1 GUICtrlSetData($hListToUse, $aFileList[$i]) Next EndFunc ;==>_GenerateList Func _LoadProfile() $aItems = _GUICtrlListBox_GetSelItemsText($ListView1) For $iI = 1 To $aItems[0] $sItems &= $aItems[$iI] Next $YourIni = @ScriptDir & "\Profiles\" & $sItems GUICtrlSetData($Input1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlSetData($Input2, IniRead($YourIni, "Settings", "Password", "")) _GUICtrlComboBox_SetCurSel($Combo1, IniRead($YourIni, "Settings", "Server", "")) _GUICtrlComboBox_SetCurSel($Combo1, IniRead($YourIni, "Settings", "Channel", "")) GUICtrlSetState($AutoLogIn, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) GUICtrlSetState($AutoPots, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) GUICtrlSetState($AutoAttack, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) GUICtrlSetState($AutoLoot, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) GUICtrlSetState($AutoFish, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) GUICtrlSetState($Market, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) EndFunc Func _Start() EndFunc Func _Profile() GUICreate("Profile", 195, 140, 193, 125) GUICtrlCreateLabel("Name your Profile:", 40, 24, 114, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateInput("", 24, 56, 145, 21) GUICtrlCreateButton("Save", 96, 96, 75, 25, 0) GUICtrlSetOnEvent(-1, "_Save") GUISetState(@SW_SHOW) EndFunc Func _Save() GUIDelete("") $temp = GUICtrlRead($Profile) $name = @ScriptDir & "\Profiles\" & $temp & ".ini" IniWrite($name, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($name, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($name, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($name, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($name, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($name, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($name, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($name, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($name, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($name, "Settings", "MarketMode", _GUIToIni($Market)) _GenerateList($ListView1, $ProfileDirectory) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc ;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 hmm thats wierd didnt test it that much but hes a little more updated that does the dropdownboxes as well expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <ListBoxConstants.au3> #include <GUIComboBox.au3> #include <GuiConstantsEx.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market, $sItems, $Profile $ProfileDirectory = @ScriptDir & "\Profiles" DirCreate($ProfileDirectory) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateList("", 0, 168, 417, 177) GUICtrlSetOnEvent(-1, "_LoadProfile") _GenerateList($ListView1, $ProfileDirectory) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Profile") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _GenerateList($hListToUse, $vDirectoryToSearch) $aFileList = _FileListToArray($vDirectoryToSearch, "*.ini") For $i = 1 To UBound($aFileList) - 1 GUICtrlSetData($hListToUse, $aFileList[$i]) Next EndFunc ;==>_GenerateList Func _LoadProfile() $aItems = _GUICtrlListBox_GetSelItemsText($ListView1) For $iI = 1 To $aItems[0] $sItems &= $aItems[$iI] Next $YourIni = @ScriptDir & "\Profiles\" & $sItems GUICtrlSetData($Input1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlSetData($Input2, IniRead($YourIni, "Settings", "Password", "")) _GUICtrlComboBox_SetCurSel($Combo1, IniRead($YourIni, "Settings", "Server", "")) _GUICtrlComboBox_SetCurSel($Combo1, IniRead($YourIni, "Settings", "Channel", "")) GUICtrlSetState($AutoLogIn, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) GUICtrlSetState($AutoPots, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) GUICtrlSetState($AutoAttack, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) GUICtrlSetState($AutoLoot, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) GUICtrlSetState($AutoFish, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) GUICtrlSetState($Market, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) EndFunc Func _Start() EndFunc Func _Profile() GUICreate("Profile", 195, 140, 193, 125) GUICtrlCreateLabel("Name your Profile:", 40, 24, 114, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateInput("", 24, 56, 145, 21) GUICtrlCreateButton("Save", 96, 96, 75, 25, 0) GUICtrlSetOnEvent(-1, "_Save") GUISetState(@SW_SHOW) EndFunc Func _Save() GUIDelete("") $temp = GUICtrlRead($Profile) $name = @ScriptDir & "\Profiles\" & $temp & ".ini" IniWrite($name, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($name, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($name, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($name, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($name, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($name, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($name, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($name, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($name, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($name, "Settings", "MarketMode", _GUIToIni($Market)) _GenerateList($ListView1, $ProfileDirectory) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc ;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc this is great sir but still i can save only 1 accounts maybe u can upgrade it in 5 or 10 accounts?? or else its something wrong about the listview???and everytime i save its only overwrite/replace the previous save... [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 yup im debugin the funcs atm and added not to ask to resave Link to comment Share on other sites More sharing options...
jerwin Posted July 3, 2008 Author Share Posted July 3, 2008 yup im debugin the funcs atm and added not to ask to resaveahh ok sir i will wait to the script while i studying youre script.... im very very thankful i wish in other time u can help me more.. muttley [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font] Link to comment Share on other sites More sharing options...
tlokz Posted July 3, 2008 Share Posted July 3, 2008 Ok, sqaushed two bugs with not saving more then one and then the asking to name a loaded profile expandcollapse popup#include <file.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <ListBoxConstants.au3> #include <GUIComboBox.au3> #include <GuiConstantsEx.au3> Global $ListView1, $Input1, $Input2, $Combo1, $Combo2, $AutoLogIn, $AutoPots, $AutoAttack, $AutoLoot, $AutoFish, $Market, $sItems, $Profile, $YourIni $Loaded = 0 $ProfileDirectory = @ScriptDir & "\Profiles" DirCreate($ProfileDirectory) Opt("GUIOnEventMode", 1) GUICreate("ATTO BOT", 420, 548, 193, 115) GUICtrlCreatePic("C:\Documents and Settings\user\My Documents\My Pictures\dekaron.jpg", 0, 0, 417, 161, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $ListView1 = GUICtrlCreateList("", 0, 168, 417, 177) GUICtrlSetOnEvent(-1, "_LoadProfile") _GenerateList($ListView1, $ProfileDirectory) GUICtrlCreateGroup("LogIn", 0, 352, 417, 145, $BS_FLAT) GUICtrlCreateLabel("Account", 8, 368, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input1 = GUICtrlCreateInput("", 96, 368, 153, 21) GUICtrlCreateLabel("Password", 8, 400, 68, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Input2 = GUICtrlCreateInput("", 96, 400, 153, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlCreateLabel("Server", 8, 432, 52, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo1 = GUICtrlCreateCombo("", 96, 432, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "´«¹ÙÀ̽º|Æĸ£Ä«|½ÃÁî|Ç︮¿Â|Ŧ|¹ÝÀú") GUICtrlCreateLabel("Channel", 8, 464, 60, 20) GUICtrlSetFont(-1, 10, 800, 0, "Courier New") $Combo2 = GUICtrlCreateCombo("", 96, 464, 153, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetData(-1, "1¼¹ö|2¼¹ö|3¼¹ö|4¼¹ö|5¼¹ö|6¼¹ö|Àӽü¹ö") GUICtrlCreateGroup("Bot Mode", 256, 360, 153, 129) $AutoLogIn = GUICtrlCreateCheckbox("AutoLogIn", 280, 376, 97, 17) $AutoPots = GUICtrlCreateCheckbox("AutoPots", 280, 392, 97, 17) $AutoAttack = GUICtrlCreateCheckbox("AutoAttack", 280, 408, 97, 17) $AutoLoot = GUICtrlCreateCheckbox("AutoLoot", 280, 424, 97, 17) $AutoFish = GUICtrlCreateCheckbox("AutoFish", 280, 440, 97, 17) $Market = GUICtrlCreateCheckbox("MarketMode", 280, 456, 97, 17) GUICtrlCreateButton("Start", 144, 504, 145, 41, 0) GUICtrlSetOnEvent(-1, "_Start") GUICtrlCreateButton("Save", 0, 504, 139, 41, 0) GUICtrlSetOnEvent(-1, "_Profile") GUICtrlCreateButton("Exit", 296, 504, 123, 41, 0) GUICtrlSetOnEvent(-1, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _GenerateList($hListToUse, $vDirectoryToSearch) $aFileList = _FileListToArray($vDirectoryToSearch, "*.ini") For $i = 1 To UBound($aFileList) - 1 GUICtrlSetData($hListToUse, $aFileList[$i]) Next EndFunc ;==>_GenerateList Func _LoadProfile() $Loaded = 1 $File = _GUICtrlListBox_GetText($ListView1, _GUICtrlListBox_GetCurSel($ListView1)) $YourIni = @ScriptDir & "\Profiles\" & $File GUICtrlSetData($Input1, IniRead($YourIni, "Settings", "Acccount", "")) GUICtrlSetData($Input2, IniRead($YourIni, "Settings", "Password", "")) _GUICtrlComboBox_SetCurSel($Combo1, IniRead($YourIni, "Settings", "Server", "")) _GUICtrlComboBox_SetCurSel($Combo1, IniRead($YourIni, "Settings", "Channel", "")) GUICtrlSetState($AutoLogIn, _IniToGui(IniRead($YourIni, "Settings", "AutoLogIn", 1))) GUICtrlSetState($AutoPots, _IniToGui(IniRead($YourIni, "Settings", "AutoPots", 1))) GUICtrlSetState($AutoAttack, _IniToGui(IniRead($YourIni, "Settings", "AutoAttack", 1))) GUICtrlSetState($AutoLoot, _IniToGui(IniRead($YourIni, "Settings", "AutoLoot", 1))) GUICtrlSetState($AutoFish, _IniToGui(IniRead($YourIni, "Settings", "AutoFish", 1))) GUICtrlSetState($Market, _IniToGui(IniRead($YourIni, "Settings", "MarketMode", 1))) EndFunc Func _Start() EndFunc Func _Profile() If $Loaded = 0 Then GUICreate("Profile", 195, 140, 193, 125) GUICtrlCreateLabel("Name your Profile:", 40, 24, 114, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateInput("", 24, 56, 145, 21) GUICtrlCreateButton("Save", 96, 96, 75, 25, 0) GUICtrlSetOnEvent(-1, "_Save") GUISetState(@SW_SHOW) Else _Save() Endif EndFunc Func _Save() If $Loaded = 0 Then $temp = GUICtrlRead($Profile) GUIDelete("") $name = @ScriptDir & "\Profiles\" & $temp & ".ini" _FileCreate($name) Else $name = $YourIni EndIf IniWrite($name, "Settings", "Acccount", GUICtrlRead($Input1)) IniWrite($name, "Settings", "Password", GUICtrlRead($Input2)) IniWrite($name, "Settings", "Server", GUICtrlRead($Combo1)) IniWrite($name, "Settings", "Channel", GUICtrlRead($Combo2)) IniWrite($name, "Settings", "AutoLogIn", _GUIToIni($AutoLogIn)) IniWrite($name, "Settings", "AutoPots", _GUIToIni($AutoPots)) IniWrite($name, "Settings", "AutoAttack", _GUIToIni($AutoAttack)) IniWrite($name, "Settings", "AutoLoot", _GUIToIni($AutoLoot)) IniWrite($name, "Settings", "AutoFish", _GUIToIni($AutoFish)) IniWrite($name, "Settings", "MarketMode", _GUIToIni($Market)) _GenerateList($ListView1, $ProfileDirectory) EndFunc Func _IniToGUI($A) If $A = 1 Then Return $GUI_CHECKED Else Return $GUI_UNCHECKED EndIf EndFunc ;==>_IniToGui Func _GUIToIni($CheckBox) If GUICtrlRead($CheckBox) = $GUI_CHECKED Then Return 1 Else Return 0 EndIf EndFunc Func _Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
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