Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EncryptDecrypt
#1
I found this topic Auto Encrypt Decrypt and played with code a little so i can do it for many macrosFunction EncryptDecrypt
Code:
Copy      Help
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
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.
#2
Sorry this works fine with numbers also its when they have window trigger it doesnt find them
#3
This is fixed now sorry i figured it out and fixed code in post
Function EncryptDecrypt
Code:
Copy      Help
str pw="PasswordForMacro"
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
,act _hwndqm
,ni=1
,;retrytwice
,a=acc(s "" _hwndqm "id=2202 SysTreeView32" "" 0x1031)
,err
,,ni.add(1)
,,if(ni>3)
,,,s+astrix
,,,a=acc(s "" _hwndqm "id=2202 SysTreeView32" "" 0x1031)
,,,err
,,,,goto skip
,,,goto select
,,goto retrytwice
,;select
,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


Forum Jump:


Users browsing this thread: 1 Guest(s)