|
You last visited: Today at 16:29
Advertisement
IniWrite (Fail) wiso ??
Discussion on IniWrite (Fail) wiso ?? within the AutoIt forum part of the Coders Den category.
07/04/2013, 17:31
|
#1
|
elite*gold: 0
Join Date: Jan 2013
Posts: 481
Received Thanks: 296
|
IniWrite (Fail) wiso ??
Hi ich möchte einen kleinen Bot Helper für mich machen hier mal die Gui davon.<br><br>  <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
|
#2
|
elite*gold: 0
Join Date: Apr 2012
Posts: 380
Received Thanks: 163
|
It would be cool if you would say the problem in english, maybe i can help you.
|
|
|
07/04/2013, 17:48
|
#3
|
elite*gold: 0
Join Date: Jan 2013
Posts: 481
Received Thanks: 296
|
Quote:
Originally Posted by CantShutMyMouth
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
|
#4
|
elite*gold: 12
Join Date: Jun 2012
Posts: 2,049
Received Thanks: 138
|
Setze GuiCtrlRead vor.
|
|
|
07/04/2013, 17:55
|
#5
|
elite*gold: 0
Join Date: Apr 2012
Posts: 380
Received Thanks: 163
|
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
|
#6
|
elite*gold: 0
Join Date: Jan 2013
Posts: 481
Received Thanks: 296
|
oh thank you, it works now, thank you had a small mistake.
Thanks all
can be closed
lg
|
|
|
07/04/2013, 17:57
|
#7
|
elite*gold: 12
Join Date: Jun 2012
Posts: 2,049
Received Thanks: 138
|
Quote:
Originally Posted by CantShutMyMouth
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
|
#8
|
elite*gold: 0
Join Date: Jan 2013
Posts: 481
Received Thanks: 296
|
ja vielen Dank an euch hatte einen kleinen denkfehler,
kann geschlossen werden
lg
|
|
|
07/04/2013, 18:52
|
#9
|
elite*gold: 12
Join Date: Jun 2012
Posts: 2,049
Received Thanks: 138
|
Das musst du schließen!
Oben auf "Edit" --> "Erweitert" und dann unten auf "Thread schließen"
LG Fl00d3R
|
|
|
07/04/2013, 20:34
|
#10
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
Quote:
Originally Posted by Fl00d3R
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
|
#11
|
elite*gold: 900
Join Date: Apr 2009
Posts: 14,981
Received Thanks: 11,403
|
closed as requested
|
|
|
 |
Similar Threads
|
Frage zu iniwrite
01/06/2011 - AutoIt - 7 Replies
hi com,
ich habe 1 fragen ich will mir was machen aber wenn ich iniwrite(@scriptdir & "/text.ini","","",&q uot;test") mache dann wird es so dagestellt:
=test wie mache ich es das das die und = wegbleiben?
|
Hilfe zu iniwrite
05/29/2010 - AutoIt - 2 Replies
Hi leute,
ich bin ein autoit anfänger und habe ein problem:
Ich habe drei Inputfelder, deren Inhalte in eine Ini geschrieben werden sollen.
Allerdings steht in der Ini statt den Inhalten der Inputfelder immer nur 3 (anstatt dem ersten), 4 (anstatt dem zweiten), 5 (anstatt dem dritten)
Kann mir da jemand helfen? der kriegt auch ein THX
|
Iniwrite Problem
05/02/2010 - AutoIt - 9 Replies
Hey Leute,
haenge grad am Problem fest,das nachdem ich auf den Save Button gedrueckt habe,er nicht die Ini erstellt.
Er erstellt es aber,wenn ich es per Hand eintippe,dann funktioniert alles normal.
Wenn ich aber per Fileopendialog das reinfuege passiert nix
Wer Ahnung warum?
|
iniwrite
07/23/2009 - AutoIt - 7 Replies
steh grad irgendwie aufm schlauch, kann mir mal bitte wer sagen warum des iniwrite hier net funktioniert?
checkpath()
Func checkpath()
$path = IniRead("tt6.ini", "path", "folder", "nothing set")
If $path = "nothing set" Or $path = "" Then
$path1 = FileOpenDialog("please set the path to your Guild Wars executable", @ProgramFilesDir, "gw.exe (*.exe)", 1 + 2)
If $path1 = "" Then
MsgBox(16, "", "the bot wont work without your right guildwars dir!")
|
All times are GMT +1. The time now is 16:30.
|
|