Hi all.
I was making a new dialog window, and i wanted to have a combobox with 10 presets, on selecteing one of them, and clicking on apply i want them to be put to use:
The dialog is for "Blowfish" i wasnted to add 10 presets to the encryption box and 10 to the decryption box, i already have 2 test boxs which work all right. How would i go about adding these preset to the combo box?
Code:
alias blow {
if (%bencrypt == $null || %bdecrypt == $null) {
$input(You must set the keys first!,oh,Blowfish - Error)
/blowfish
/halt
}
echo $timestamp < $+ $me $+ @VCryp> $$1-
/.msg $active VCryp $gettok($dll(blowfish/blowfish.dll,Encrypt,%bencrypt $$1-),2-,32)
}
on ^1:TEXT:VCryp *:#:echo $chan $timestamp < $+ $nick $+ @VCryp> $gettok($dll(blowfish/blowfish.dll,Decrypt,%bdecrypt $$2-),2-,32) | haltdef
on ^1:TEXT:VCryp *:?:query $nick | echo $query($nick) $timestamp < $+ $nick $+ @VCryp> $gettok($dll(blowfish/blowfish.dll,Decrypt,%bdecrypt $$2-),2-,32) | haltdef
on ^1:CHAT:VCryp *:echo =$nick $timestamp < $+ $nick $+ @VCryp> $gettok($dll(blowfish/blowfish.dll,Decrypt,%bdecrypt $$2-),2-,32) | haltdef
alias blowfish {
/dialog -m blow blow
}
dialog blow {
title "VTECrypto® II"
icon blowfish/blowfish.ico, 0
size -1 -1 104 168, size
option dbu
box "VTEC §cript II ® Crypto...", 2, 0 73 89 81
text "Encrypt", 3, 4 85 24 8
edit %bencrypt, 4, 29 83 58 10
edit %bdecrypt, 5, 29 94 58 10
text "Decrypt", 6, 4 96 24 8
button "Apply", 32, 60 155 28 12
button "Cancel", 31, 30 155 28 12, cancel
button "OK", 30, 0 155 28 12, ok
combo 99, 29 108 58 80,drop ,vsbar
combo 98, 29 120 58 80,drop ,vsbar
text "En Preset", 97, 4 110 24 8
text "De Preset", 96, 4 122 24 8
check "Encrypt text by default?", 7, 3 143 83 10, left
icon 1, 2 -6 86 86, blowfish\blowfish.jpg
icon 29, 74 2 45 164,$mircdir/pictures/K-TEK V-TEC Menubar.jpg
}
on *:dialog:blow:sclick:32,30,7,99,98:{
;echo -a Did: $did
if ($did == 7) {
if ($did(blow,$did).state == 1) {
set %blowcrypt yes
;echo -a Encryption: Yes
}
else {
set %blowcrypt no
;echo -a Encryption: No
}
}
/set %bencrypt $did(blow,4)
/set %bdecrypt $did(blow,5)
/set %bencrypt $did(blow,99)
/set %bdecrypt $did(blow,98)
}
on *:dialog:blow:init:0:{
if (%blowcrypt == yes) { did -c blow 7 }
}
on 1:INPUT:*:{
if (($left($1,1) == /) && (!$ctrlenter)) { return }
if (%blowcrypt == yes) {
/blow $$1-
haltdef
}