09-17-2007, 11:24 PM
This macro Is meant to toggle Encrypt/Decrypt. If your macro selected is not Encrypted it will Encrypt it, if it is Encrypted it will Decrypt it.
NOTE THIS WILL NOT DECRYPT A MACRO THAT YOU DO NOT HAVE THE PASSWORD FOR.
Also note the password has to be the same in this macro as the macro you are going to Encrypt/Decrypt.
Function ( AED_John ) Trigger ( F12 /QM )
str pw="yourpw1";; change this to the password you would like
;DO NOT! LEAVE AS "yourpw1" or someone may guess your password.
int hwnd;str enct;Acc a
men 2010 _hwndqm
hwnd=wait(5 WC win("Options" "#32770"))
if hwnd=0
,out 1
,end
act hwnd
a=acc("Security" "PAGETAB" hwnd "SysTabControl32" "" 0x1001)
a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
pw.setwintext(id(1051 hwnd))
pw.setwintext(id(1053 hwnd))
enct.getmacro("" 5)
if val(enct)=0
,but+ id(1106 hwnd)
else
,but+ id(1107 hwnd)
act hwnd
but+ id(1 hwnd)