04-21-2009, 05:04 PM
I found this topic Auto Encrypt Decrypt and played with code a little so i can do it for many macrosFunction EncryptDecrypt
but my problem is this doesnt find macro with numbers in when searching through ACC eg. Macro1 it works fine otherwise. is the a way i can fix this.
str pw="macropassword"
str s ss="MACRO1[]MACRO2[]MACRO3"
int i
int hwnd;str enct;Acc C;Acc a;str astrix="*"
CURRENCY ni
for i 0 2000000000
,if(s.getl(ss -i)<0) break ;;no more
,if(s.len=0) continue ;;skip empty
,s+astrix
,act _hwndqm
,ni=1
,;retrytwice
,a=acc(s "" _hwndqm "id=2202 SysTreeView32" "" 0x1031)
,err
,,ni.add(1)
,,if(ni>3)
,,,goto skip
,,goto retrytwice
,a.Select(SELFLAG_TAKESELECTION)
,;again
,act _hwndqm
,key A(VK_F12)
,hwnd=wait(1 WC win("Options" "#32770"))
,err
,,goto again
,act hwnd
,C=acc("Security" "PAGETAB" hwnd "SysTabControl32" "" 0x1001)
,C.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
,pw.setwintext(id(1051 hwnd))
,pw.setwintext(id(1053 hwnd))
,but+ id(1106 hwnd)
,1 WC id(65535 "Quick Macros")
,err
,,clo hwnd
,,goto skip
,0.001
,but+ id(2 "Quick Macros")
,but+ id(1107 hwnd)
,clo hwnd
,;skip
,0.1