IniWrite (Fail) wiso ??

07/04/2013 17:31 Hemoglobien²10#1
Hi ich möchte einen kleinen Bot Helper für mich machen hier mal die Gui davon.<br><br>[Only registered and activated users can see links. Click Here To Register...]<br>

allso das Problem liegt darin den path oben speicher es einwandfrei, blos wenn ich die ID PW Server Char speichern möchte, schreibt es mir immer in die ini wie man oben sieht eine 9 ein 10 eine 11 eine 12, aber normal sollte das funktionieren, ich weiss das ist bestimmt nur ein kleiner Denk Fehler aber ich bekomms ihrgen wie nicht hin das er das eingegebene von den Inputboxen speicher, den path ganz oben speicher er ja,

könnte mir da mal jemand kurtz helfen das wäre Super.

lg

hier mal das Script:
Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <String.au3>
 
$iniReadBot1path = IniRead(@scriptdir & "\saves\clientpath.ini", "Bot01", "path",1)
$iniReadBot1Id1 = IniRead(@scriptdir & "\saves\clientpath.ini", "Bot01", "ID",1)
$iniReadBot1PW1 = IniRead(@scriptdir & "\saves\clientpath.ini", "Bot01", "PW",1)
$iniReadBot1Server1 = IniRead(@scriptdir & "\saves\clientpath.ini", "Bot01", "Server",1)
$iniReadBot1AccNr1 = IniRead(@scriptdir & "\saves\clientpath.ini", "Bot01", "AccNr",1)
#RequireAdmin 


$form1 = GUICreate("Bot_Helper 0.1", 420, 196, 191, 124, -1);, BitOR($ws_ex_toolwindow, $ws_ex_windowedge))
GUISetBkColor(0x3399FF)
$group1 = GUICtrlCreateGroup("Bot 01", 8, 8, 405, 110)
$Bot1input1 = GUICtrlCreateInput($iniReadBot1path, 16, 24, 337, 21)
$IdLabel1 = GUICtrlCreateLabel("ID", 16, 47, 30, 21)
$PwLabel1 = GUICtrlCreateLabel("PW", 120, 47, 30, 21)
$ServerLabel1 = GUICtrlCreateLabel("Server", 224, 47, 30, 21)
$ServerServer1 = GUICtrlCreateLabel("Char", 264, 47, 30, 21)
$input1Bot1Id1 = GUICtrlCreateInput($iniReadBot1Id1, 16, 60, 100, 21)
$input1Bot1Pw1 = GUICtrlCreateInput($iniReadBot1PW1, 120, 60, 100, 21)
$input1Bot1Server1 = GUICtrlCreateInput($iniReadBot1Server1, 224, 60, 35, 21)
$input1Bot1Char1 = GUICtrlCreateInput($iniReadBot1AccNr1, 264, 60, 35, 21)

$Bot1button1 = GUICtrlCreateButton("Save", 360, 24, 45, 21, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Bot1run = GUICtrlCreateButton("Bypass", 15, 85, 75, 25, 0)
$Bot1button2 = GUICtrlCreateButton("Kill Torrentpatch", 165, 85, 91, 17, 0)
$Bot1button3 = GUICtrlCreateButton("Patcher", 90, 85, 75, 25, 0)
;$Bot1button4 = GUICtrlCreateButton("Set.", 165, 85, 75, 25, 0)
$Bot1SaveBot01 = GUICtrlCreateButton("Save", 305, 59, 75, 21, 0)
GUISetState(@SW_SHOW)

;GUICtrlCreatePic(@ScriptDir & "\M2hintergrund.jpg", 0, 0, 500, 300, BitOR($ss_notify, $ws_group, $ws_clipsiblings))
While 1
    $nmsg = GUIGetMsg() 
    Switch $nmsg
        Case $gui_event_close
            Exit 
        Case $Bot1button1
            $pfadBot1 = FileOpenDialog("Metin2client.bin finden", "C:\", "Metin2 Client Datei (*.bin)")
                GUICtrlSetData($Bot1input1, $pfadBot1)
                Pathsave()
        Case $Bot1button2
            ProcessClose("metin2.bin")
        Case $Bot1button3
            $stringBot1 = GUICtrlRead($Bot1input1)
            $pathBot1 = StringTrimRight($stringBot1, 16)
            Run($pathBot1 & "PatchUpdater.exe")
        Case $Bot1SaveBot01    
            Bot1Accountsafe()
        Case $Bot1run
            $ortBot1 = GUICtrlRead($Bot1input1)
            Run($ortBot1)
    EndSwitch 
WEnd

Func Pathsave()
 
   IniWrite(@scriptdir & "\saves\clientpath.ini", "Bot01", "path", $pfadBot1) 
 
EndFunc
Func Bot1Accountsafe()

   IniWrite(@scriptdir & "\saves\clientpath.ini","Bot01", "ID", $input1Bot1Id1) 
   IniWrite(@scriptdir & "\saves\clientpath.ini","Bot01", "PW", $input1Bot1Pw1)
   IniWrite(@scriptdir & "\saves\clientpath.ini","Bot01", "Server", $input1Bot1Server1)
   IniWrite(@scriptdir & "\saves\clientpath.ini","Bot01", "AccNr", $input1Bot1Char1)
   
 
EndFunc
Danke schon einmal im vorraus
07/04/2013 17:45 CantShutMyMouth#2
It would be cool if you would say the problem in english, maybe i can help you.
07/04/2013 17:48 Hemoglobien²10#3
Quote:
Originally Posted by CantShutMyMouth View Post
It would be cool if you would say the problem in english, maybe i can help you.
allso the problem lies in the path above it store properly, merely if I want to save the ID PW Server char, it always send me to the ini how the top looks a 9 a 10 a 11 a 12, but normally this should work, I know that is only a small mistake but I do not like bekomms ihrgen back the memory of the input boxes, the path at the top of memory he yes, he entered the
07/04/2013 17:49 Fl00d3R#4
Setze GuiCtrlRead vor.
07/04/2013 17:55 CantShutMyMouth#5
or you could try:
PHP Code:
Local $sIni1 "\saves\clientpath.ini"
$value="ID=" GuiCtrlRead($2)
IniWriteSection($sIni1"common"$value
It works 100%...


Or, at your code, it is:

PHP Code:
IniWrite(@scriptdir "\saves\clientpath.ini","Bot01""ID"GuiCtrlRead($input1Bot1Id1)) 
07/04/2013 17:57 Hemoglobien²10#6
oh thank you, it works now, thank you had a small mistake.

Thanks all

can be closed

lg
07/04/2013 17:57 Fl00d3R#7
Quote:
Originally Posted by CantShutMyMouth View Post
or you could try:
PHP Code:
Local $sIni1 "\saves\clientpath.ini"
$value="ID=" GuiCtrlRead($2)
IniWriteSection($sIni1"common"$value
It works 100%...


Or, at your code, it is:

PHP Code:
IniWrite(@scriptdir "\saves\clientpath.ini","Bot01""ID"GuiCtrlRead($input1Bot1Id1)) 
Wie gesagt, GuiCtrlRead vor die Variablen der Inputs...
07/04/2013 18:04 Hemoglobien²10#8
ja vielen Dank an euch hatte einen kleinen denkfehler,

kann geschlossen werden

lg
07/04/2013 18:52 Fl00d3R#9
Das musst du schließen!

Oben auf "Edit" --> "Erweitert" und dann unten auf "Thread schließen"

LG Fl00d3R
07/04/2013 20:34 omer36#10
Quote:
Originally Posted by Fl00d3R View Post
Das musst du schließen!

Oben auf "Edit" --> "Erweitert" und dann unten auf "Thread schließen"

LG Fl00d3R
geht nur im black market.
07/04/2013 21:54 xxfabbelxx#11
closed as requested