Something like this
Code:
NoRCONPassFound = RCON
EnterRCONPass = Please enter New Password.
iniread, RemRCONPass, SETTINGS.INI,Remember,RCONPass,0
iniread, RCONPass, SETTINGS.INI, DATA, RCONPass, 00
iniread, RemRCONPassState, SETTINGS.INI, Remember, RCONPassState, 1
iniread, RCONPassState, SETTINGS.INI, DATA, RCONPassState, 1
ifexist SETTINGS.INI
return
ifnotexist SETTINGS.INI
ifequal, RCONPass, 00
RCONPass =
start:
Gui, Add, Checkbox, x185 y82 w20 h20 vRCONPassState Checked%RCONPassState%
Gui, Add, Text, x30 y10 w145 h20, %EnterRCONPass%
ifequal, RCONPassState, 1
Gui, Add, Edit, x20 y35 w160 h20 vRCONPass Password
ifequal, RCONPassState, 0
Gui, Add, Edit, x20 y40 w160 h20 vRCONPass
Gui, Add, Button, x35 y70 w50 h20, OK
Gui, Add, Button, x120 y70 w50 h20, Cancel
ifequal, DialogCaption, 0
gui, -caption
Gui, Show, h100 w200, %NoRCONPassFound%
Return
GuiClose:
ButtonCancel:
gui, submit
gui, destroy
return
ButtonOK:
Gui, submit
gui, destroy
Text = %RCONPass%
msgbox, %text%
pw = psw
Gosub, Crypt
msgbox, %Cipher%
Text = %Cipher%
pw = psw
;Gosub, Crypt
;msgbox, %Cipher%
ifequal, RemRCONPass, 0
iniwrite, %Cipher%, SETTINGS.INI, DATA, RCONPass
ifequal, RemRCONPassState, 1
iniwrite, %RCONPassState%, SETTINGS.INI, DATA, RCONPassState
Crypt:
BLines = %A_BatchLines%
SetBatchLines, -1
AutoTrim, Off
StringLen, PWLen, PW
Cipher =
Loop, 256
{
A = %A_Index%
A -= 1
Transform, Mod, Mod, %A%, %PWLen%
Mod += 1
StringMid, Chr, PW, %MOD%, 1
Transform, ASC, asc, %Chr%
Key%A% = %ASC%
sbox%A% = %A%
}
B = 0
Loop, 256
{
A = %A_Index%
A -= 1
StringTrimRight, tempsa, sbox%A%, 0
StringTrimRight, tempka, Key%A%, 0
tempB = %B%
tempB += %tempsa%
tempB += %tempka%
Transform, B, Mod, %tempB%, 256
StringTrimRight, tempsb, sbox%B%, 0
sbox%A% = %tempsb%
sbox%B% = %tempsa%
}
tempI =
J =
StringLen, TLen, Text
Loop, %TLen%
{
A = %A_Index%
tempI ++
Transform, I, Mod, %tempI%, 256
StringTrimRight, tempsi, sbox%I%, 0
Divd = %tempsi%
Divd += %J%
Transform, J, Mod, %Divd%, 256
StringTrimRight, tempsj, sbox%J%, 0
Divd = %tempsi%
Divd += %tempsj%
Transform, Mod, Mod, %Divd%, 256
StringTrimRight, K, sbox%Mod%, 0
StringMid, Chr, Text, %A%, 1
Transform, ASC, asc, %Chr%
Transform, CipherBy, bitxor, %Asc%, %K%
Transform, out, chr, %CipherBy%
Cipher = %Cipher%%out%
}
SetBatchLines, %BLines%
Return
$Numpad1::
Text = %RCONPass%
;msgbox, %text%
pw = psw
Gosub, Crypt
;msgbox, %Cipher%
Text = %Cipher%
pw = psw
;Gosub, Crypt
;msgbox, %Cipher%
Send,\
Sleep, 100
Send, rcon %Cipher% sv_players
return
Its not fully functional + its just missing a small portion of the code now I think but was wondering if u could tell me if I was on the right track & what u thought of the code so far.
I used yr Encryption formula, hope u dont mind. Couldn't have done it without yr help or without this great program.

Also got bits & pieces of the code from other sources & am sorry if I didn't mention u in this or any other post.
PS: Still can't get the checkbox thing 2 work right.Can't toggle hide/show Password while gui is loaded.U know how 2 fix it
