Can Anyone Help Me With My Script.
I Have Not Included A Load File Option Yet, However I Am Trying To Get Just A Plain Text Encryption Going.
Let>MSG_HEIGHT=400
Let>MSG_WIDTH=400
Dialog>CryptDialog
Caption=Encrypt / Decrypt Tool
Width=445
Height=320
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Label=Text To Encrypt / Decrypt,8,8,true
Label=Password String,8,224,true
Memo=Txt,8,24,417,193,
Edit=Password,8,240,161,
Button=Encrypt,176,240,75,25,3
Button=Decrypt,256,240,75,25,4
Button=Load Text File,336,240,89,25,5
EndDialog>CryptDialog
Show>CryptDialog,CryptDialog_Result
if>CryptDialog_Result=2,Exit
if>CryptDialog_Result=,Exit
if>CryptDialog_Result=3,Encrypt
if>CryptDialog_Result=4,Decrypt
Label>Encrypt
Crypt>%CryptDialog.Password%,%%CryptDialog.Txt%,Result1
MessageModal>%Result1%
Goto>Exit
Label>Decrypt
Crypt>%CryptDialog.Password%,Result1,Result2
MessageModal>%Result2%
Goto>Exit
Label>Exit
Crypt
Moderators: JRL, Dorian (MJT support)
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Crypt
FIREFIGHTER
You have two errors in Encrypt and Decrypt. These sections should look like this:
Label>Encrypt
Crypt>%CryptDialog.Password%,%CryptDialog.Txt%,Result1
MessageModal>%Result1%
Goto>Exit
Label>Decrypt
Crypt>%CryptDialog.Password%,%CryptDialog.Txt%,Result2
MessageModal>%Result2%
Goto>Exit
In Encrypt section you had an extra % symbol. Actually you don't need these percent symbols here at all because you only have the variables on their own.
In Decrypt you were trying to decrypt Result1 which does not exist if you get here. What you are wanting to do is decrypt the text in the dialog that was entered by the user.
Label>Encrypt
Crypt>%CryptDialog.Password%,%CryptDialog.Txt%,Result1
MessageModal>%Result1%
Goto>Exit
Label>Decrypt
Crypt>%CryptDialog.Password%,%CryptDialog.Txt%,Result2
MessageModal>%Result2%
Goto>Exit
In Encrypt section you had an extra % symbol. Actually you don't need these percent symbols here at all because you only have the variables on their own.
In Decrypt you were trying to decrypt Result1 which does not exist if you get here. What you are wanting to do is decrypt the text in the dialog that was entered by the user.
MJT Net Support
[email protected]
[email protected]
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Hi,
It's the unnecessary % % symbols you have used making it try to resolve the content of the text to variables. You just want all the text treated as one so remove the % symbols and it works fine. Your script should look like this:
Let>MSG_HEIGHT=400
Let>MSG_WIDTH=400
Dialog>CryptDialog
Caption=Encrypt / Decrypt Tool
Width=445
Height=320
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Label=Text To Encrypt / Decrypt,8,8,true
Label=Password String,8,224,true
Memo=Txt,8,24,417,193,
Edit=Password,8,240,161,
Button=Encrypt,176,240,75,25,3
Button=Decrypt,256,240,75,25,4
Button=Load Text File,336,240,89,25,5
EndDialog>CryptDialog
Show>CryptDialog,CryptDialog_Result
if>CryptDialog_Result=2,Exit
if>CryptDialog_Result=,Exit
if>CryptDialog_Result=3,Encrypt
if>CryptDialog_Result=4,Decrypt
Label>Encrypt
Crypt>CryptDialog.Password,CryptDialog.Txt,Result1
MessageModal>Result1
Goto>Exit
Label>Decrypt
Crypt>CryptDialog.Password,CryptDialog.Txt,Result2
MessageModal>Result2
Goto>Exit
Label>Exit
It's the unnecessary % % symbols you have used making it try to resolve the content of the text to variables. You just want all the text treated as one so remove the % symbols and it works fine. Your script should look like this:
Let>MSG_HEIGHT=400
Let>MSG_WIDTH=400
Dialog>CryptDialog
Caption=Encrypt / Decrypt Tool
Width=445
Height=320
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Label=Text To Encrypt / Decrypt,8,8,true
Label=Password String,8,224,true
Memo=Txt,8,24,417,193,
Edit=Password,8,240,161,
Button=Encrypt,176,240,75,25,3
Button=Decrypt,256,240,75,25,4
Button=Load Text File,336,240,89,25,5
EndDialog>CryptDialog
Show>CryptDialog,CryptDialog_Result
if>CryptDialog_Result=2,Exit
if>CryptDialog_Result=,Exit
if>CryptDialog_Result=3,Encrypt
if>CryptDialog_Result=4,Decrypt
Label>Encrypt
Crypt>CryptDialog.Password,CryptDialog.Txt,Result1
MessageModal>Result1
Goto>Exit
Label>Decrypt
Crypt>CryptDialog.Password,CryptDialog.Txt,Result2
MessageModal>Result2
Goto>Exit
Label>Exit
MJT Net Support
[email protected]
[email protected]