|
You last visited: Today at 00:34
Advertisement
[AutoIt] Frage/Antworte Thread
Discussion on [AutoIt] Frage/Antworte Thread within the Metin2 forum part of the Popular Games category.
06/06/2009, 01:20
|
#391
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,632
Received Thanks: 8,492
|
Quote:
Originally Posted by 50Millionen
Ich hab au mal ne Frage vlt steht das schon hier drin , aber keine Lust das wenn bei den vielen Seiten rauszusuchen.
Wenn man z.B. Id u. Pw in einer .ini Datei speichert , kann man die dann auch irgendwie verschlüsselt speichern ? Weil das wär ja doof wenn jeder die Id u. Pw in der .ini Datei lesen kann :d
|
schau dir das hier mal an =)
_StringEncrypt.au3
#include <guiconstants.au3>
#include <string.au3>
; GUI and String stuff
$WinMain = GuiCreate('Encryption tool', 400, 400)
; Creates window
$EditText = GuiCtrlCreateEdit('',5,5,380,350)
; Creates main edit
$InputPass = GuiCtrlCreateInput('',5,360,100,20, 0x21)
; Creates the password box with blured/centered input
$InputLevel = GuiCtrlCreateInput(1, 110, 360, 50, 20, 0x2001)
$UpDownLevel = GUICtrlSetLimit(GuiCtrlCreateUpDown($inputlevel),1 0,1)
; These two make the level input with the Up|Down ability
$EncryptButton = GuiCtrlCreateButton('Encrypt', 170, 360, 105, 35)
; Encryption button
$DecryptButton = GuiCtrlCreateButton('Decrypt', 285, 360, 105, 35)
; Decryption button
GUICtrlCreateLabel('Password', 5, 385)
GuiCtrlCreateLabel('Level',110,385)
; Simple text labels so you know what is what
GuiSetState()
; Shows window
Do
$Msg = GuiGetMsg()
If $msg = $EncryptButton Then
GuiSetState(@SW_DISABLE,$WinMain) ; Stops you from changing anything
$string = GuiCtrlRead($EditText) ; Saves the editbox for later
GUICtrlSetData($EditText,'Please wait while the text is Encrypted/Decrypted.') ; Friendly message
GuiCtrlSetData($EditText,_StringEncrypt(1,$string, GuiCtrlRead($InputPass),GuiCtrlRead($InputLevel)))
; Calls the encryption. Sets the data of editbox with the encrypted string
; The encryption starts with 1/0 to tell it to encrypt/decrypt
; The encryption then has the string that we saved for later from edit box
; It then reads the password box & Reads the level box
GuiSetState(@SW_ENABLE,$WinMain) ; This turns the window back on
EndIf
If $msg = $DecryptButton Then
GuiSetState(@SW_DISABLE,$WinMain) ; Stops you from changing anything
$string = GuiCtrlRead($EditText) ; Saves the editbox for later
GUICtrlSetData($EditText,'Please wait while the text is Encrypted/Decrypted.') ; Friendly message
GuiCtrlSetData($EditText,_StringEncrypt(0,$string, GuiCtrlRead($InputPass),GuiCtrlRead($InputLevel)))
; Calls the encryption. Sets the data of editbox with the encrypted string
; The encryption starts with 1/0 to tell it to encrypt/decrypt
; The encryption then has the string that we saved for later from edit box
; It then reads the password box & Reads the level box
GuiSetState(@SW_ENABLE,$WinMain) ; This turns the window back on
EndIf
Until $msg = $GUI_EVENT_CLOSE ; Continue loop untill window is closed
in eine au3 speichern und starten, diese dann als folgende befehle nutzen
_StringEncrypt( 1 ,$string,$Pass,$Level) ; encrypt
_StringEncrypt( 0 ,$string,$Pass,$Level) ; decrypt
benötigtes include:
#include <string.au3>
|
|
|
06/06/2009, 08:59
|
#392
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
Ok , danke schön. Aber bei deinem Code wenn ich ihn in eine Au3 Datei einfüge kommt eine Fehlermeldung. Kannst du mir das bei hier dem Code evt. Vormachen ? (H u. HH sind Id und Pw)
Code:
Func A2()
$res = GUICtrlRead($A)
IniWrite($IniFile, "Save1", "Input", $res)
$res = GUICtrlRead($AA)
IniWrite($IniFile, "Save2", "Input", $res)
$res = GUICtrlRead($B)
IniWrite($IniFile, "Save3", "Input", $res)
$res = GUICtrlRead($BB)
IniWrite($IniFile,"Save4", "Input",$res)
$res = GUICtrlRead($C)
IniWrite($IniFile,"Save5", "Input",$res)
$res = GUICtrlRead($D)
iniwrite($IniFile,"Save6", "Input",$res)
$res = GUICtrlRead($DD)
iniwrite($IniFile,"Save7", "Input",$res)
$res = GUICtrlRead($KA)
iniwrite($IniFile,"Save8", "Input",$res)
$res = GUICtrlRead($KP)
iniwrite($IniFile,"Save9", "Input",$res)
$res = GUICtrlRead($E)
iniwrite($IniFile,"Save10","Input",$res)
$res = GUICtrlRead($EE)
iniwrite($IniFile,"Save11","Input",$res)
$res = GUICtrlRead($F)
iniwrite($IniFile,"Save12","Input",$res)
$res = GUICtrlRead($G)
iniwrite($IniFile,"Save13","Input",$res)
$res = GUICtrlRead($GG)
iniwrite($IniFile,"Save14","Input",$res)
$res = GUICtrlRead($H)
iniwrite($IniFile,"Save15","Input",$res)
$res = GUICtrlRead($HH)
iniwrite($IniFile,"Save16","Input",$res)
$res = GUICtrlRead($FF)
iniwrite($IniFile,"Save17","Input",$res)
EndFunc
Func A3()
$IniRead = IniRead($IniFile, "Save1", "Input", "Wert nicht gefunden")
GUICtrlSetData($A,$IniRead)
$IniRead = IniRead($IniFile, "Save2", "Input", "Wert nicht gefunden")
GUICtrlSetData($AA,$IniRead)
$IniRead = IniRead($IniFile, "Save3", "Input", "Wert nicht gefunden")
GUICtrlSetData($B,$IniRead)
$IniRead = IniRead($IniFile,"Save4","Input","Wert nicht gefunden")
GUICTrlSetData($BB,$IniRead)
$IniRead = iniread($IniFile,"Save5","Input","Wert nicht gefunden")
GUICtrlSetData($C,$IniRead)
$IniRead = IniRead($IniFile, "Save6", "Input", "Wert nicht gefunden")
GUICtrlSetData($D,$IniRead)
$IniRead = IniRead($IniFile, "Save7", "Input", "Wert nicht gefunden")
GUICtrlSetData($DD,$IniRead)
$IniRead = IniRead($IniFile, "Save8", "Input", "Wert nicht gefunden")
GUICtrlSetData($KA,$IniRead)
$IniRead = IniRead($IniFile, "Save9", "Input", "Wert nicht gefunden")
GUICtrlSetData($KP,$IniRead)
$IniRead = IniRead($IniFile, "Save10", "Input", "Wert nicht gefunden")
GUICtrlSetData($E,$IniRead)
$IniRead = IniRead($IniFile, "Save11", "Input", "Wert nicht gefunden")
GUICtrlSetData($EE,$IniRead)
$IniRead = IniRead($IniFile, "Save12", "Input", "Wert nicht gefunden")
GUICtrlSetData($F,$IniRead)
$IniRead = IniRead($IniFile, "Save13", "Input", "Wert nicht gefunden")
GUICtrlSetData($G,$IniRead)
$IniRead = IniRead($IniFile, "Save14", "Input", "Wert nicht gefunden")
GUICtrlSetData($GG,$IniRead)
$IniRead = IniRead($IniFile, "Save15", "Input", "Wert nicht gefunden")
GUICtrlSetData($H,$IniRead)
$IniRead = iniread($IniFile,"Save16","Input","Wert nicht gefunden")
GUICtrlSetData($HH,$IniRead)
$IniRead = iniread($IniFile,"Save17","Input","Wert nicht gefunden")
GUICtrlSetData($FF,$IniRead)
EndFunc
|
|
|
06/07/2009, 20:03
|
#393
|
elite*gold: 0
Join Date: Aug 2008
Posts: 820
Received Thanks: 909
|
IniWrite ($IniFile, "Save 1", "Input", _StringEncrypt (1, GuiCtrlRead ($AA), "password))
|
|
|
06/08/2009, 00:25
|
#394
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,632
Received Thanks: 8,492
|
welche fehlermeldung denn?
#include <String.au3>
nicht vergessen
|
|
|
06/08/2009, 13:16
|
#395
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
Ah , dickes THX an beide.
Ich hab nochmal 2 Fragen. :d
Frage 1:
Ich weiß zwar wie ich ein Passwort für ein Programm erstellen kann , aber wie schaff ich es das der Benutzer ein Passwort eingibt und das dann immer benutzen kann ? Also so wie bei Banjo´s Ch - Wechsel Bot.
Frage 2:
Wie mach ich das das der Bot das Fenster dahin zieht damit das funktioniert. (wenn das Metin2 Fenster an der falschen Stelle des Desktops ist.) So wie bei Felixlis Angelbot. :d
Auf die Antwort gibst natürlich wieder ein THX:
|
|
|
06/08/2009, 13:48
|
#396
|
elite*gold: 0
Join Date: Aug 2008
Posts: 820
Received Thanks: 909
|
Quote:
Originally Posted by 50Millionen
Ah , dickes THX an beide.
Ich hab nochmal 2 Fragen. :d
Frage 1:
Ich weiß zwar wie ich ein Passwort für ein Programm erstellen kann , aber wie schaff ich es das der Benutzer ein Passwort eingibt und das dann immer benutzen kann ? Also so wie bei Banjo´s Ch - Wechsel Bot.
Frage 2:
Wie mach ich das das der Bot das Fenster dahin zieht damit das funktioniert. (wenn das Metin2 Fenster an der falschen Stelle des Desktops ist.) So wie bei Felixlis Angelbot. :d
Auf die Antwort gibst natürlich wieder ein THX:
|
zu 1. weiß ich nicht wirklich, was du meinst
wenn du willst, dass nicht jeder dein script starten kann, sondern nur du mit nem passwort, dann geht das, indem du ganz am anfang vom script ein passwort definierst via
Code:
$password = 'dein Passwort
dann danach abfragen:
Code:
If InputBox ("Passwort", "Bitte gib dein Passwort ein", "", "*") <> $password Then Exit
danach kannst du dann dein script schreiben, das dann nur ausgeführ wird, wenn du das richtige passwort eingegeben hast
zu 2.
WinMove ("Titel", "Text", "x", "y")
mfg felixli93
|
|
|
06/09/2009, 18:44
|
#397
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
Thx zu 2.
Edit : Frage 1 hat sich erledigt
Nochmal zu _stringencrypt^^.
Wie funktioniert das bei IniRead ?
(Habs nochmal kopiert , post gelöscht und eingefügt , weil ich keine Rückmeldung bekommen habe . sry)
|
|
|
06/14/2009, 18:14
|
#398
|
elite*gold: 10
Join Date: Feb 2009
Posts: 145
Received Thanks: 52
|
Hier mein Pic up bot Screen:
Mein Problem ist das ich nicht weiter komme wie kann ich machen dass wenn ich y in die erste box eintrage und dann zeit z.b 100 und dann auf start presse, dass es pickt
So sieht es im script aus
GuiCreate("Pic up Bot v 2 by Sismon",585,181,346,338)
GuiSetState()
GUICtrlcreatelabel ("Welche Taste soll Gedrückt werden",12,20)
GUICtrlcreatelabel ("Zeit abstant in milisekunden",40,50)
$number1 = GUICtrlCreateEdit ("", 240,14,125,20,0)
$number2 = GUICtrlCreateEdit ("", 240,52,125,20,0)
$addbutton1 = GUICtrlCreateButton (" Starten ", 10,70)
$subbutton2 = GUICtrlCreateButton (" Beenden ", 10,100)
$endbutton3 = GUICtrlCreateButton (" Programm Beenden ", 10,190)
|
|
|
06/14/2009, 20:02
|
#399
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
da musst du GUICtrlRead benutzen
z.b.
$Read = GUICtrlRead($Input)
$Sleep= GUICtrlRead($Input1)
while(1)
send($Read,0)
sleep($Sleep)
Wend
|
|
|
06/15/2009, 16:38
|
#400
|
elite*gold: 10
Join Date: Feb 2009
Posts: 145
Received Thanks: 52
|
funzt leider nicht kommt fehlermeldung
|
|
|
06/15/2009, 16:46
|
#401
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
Öh , komisch. Hast du vlt irgendwas vergessen ?!
|
|
|
06/15/2009, 17:23
|
#402
|
elite*gold: 10
Join Date: Feb 2009
Posts: 145
Received Thanks: 52
|
ich habe alles so kopiert aber es geht nicht
Das hier kommt
|
|
|
06/15/2009, 17:37
|
#403
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
vlt gibst bei die die Variable $Input nicht ?^^ Die heißt bei dir bestimmt anders. Wahrscheinlich Input1 oder so.
|
|
|
06/15/2009, 17:48
|
#404
|
elite*gold: 10
Join Date: Feb 2009
Posts: 145
Received Thanks: 52
|
wenn ich dan aber auf Start klicke macht es nichts und wenn ich auf den Knopf beenden presse komm ich nicht raus muss bei der taskleiste beenden
|
|
|
06/15/2009, 19:00
|
#405
|
elite*gold: 2
Join Date: Feb 2009
Posts: 1,030
Received Thanks: 586
|
Ich versteh jetzt nicht was du meinst.
|
|
|
All times are GMT +1. The time now is 00:34.
|
|