Crypt

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Crypt

Post by CyberCitizen » Mon Sep 05, 2005 7:51 am

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
FIREFIGHTER

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Sep 05, 2005 9:00 am

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.
MJT Net Support
[email protected]

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Sep 06, 2005 2:02 am

Is There A Character Limit, Because If I Enter A Little Bit Of Text (Fill The Box) & Then Encrypt All I Get Is %Result1% Displayed In The Message Box.
FIREFIGHTER

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Sep 06, 2005 7:22 am

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
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts