Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Encrypt/decrypt QM item files or folders
#3
there is this function to automate encrypt decrypt
Function EncryptDecryptMacro
Code:
Copy      Help
;/
function encrypt ~password [$macro]

;Automates encrypting or decrypting a macro or other QM item.

;encrypt - 1 to encrypt, 0 to decrypt.
;password - password.
;macro - name of the macro. If "" or omitted - macro that is currently open.

;EXAMPLES
;EncryptDecryptMacro 1 "password" ;;encrypt current macro
;EncryptDecryptMacro 0 "password" ;;decrypt current macro
;EncryptDecryptMacro 1 "password" "Dialog33" ;;encrypt Dialog33


int w1=act(win("" "QM_Editor")) ;;activate QM
if(len(macro))
,int currentmacro=qmitem
,mac+ macro ;;open the macro, if specified
int w2=win("Options" "#32770" "qm") ;;is Options already open?
if(w2) ;;yes, remember that
,int optionsopen=1
else ;;no, open it
,men 2007 w1 ;;Options ...
,w2=wait(5 win("Options" "#32770" "qm"))
SelectTab id(12320 w2) 4 ;;select Security tab
password.setwintext(id(1051 w2)); password.setwintext(id(1053 w2)) ;;enter password
but iif(encrypt 1106 1107) w2 ;;click Encrypt or Decrypt button
if(!optionsopen) but 2 w2; wait 10 -WC w2 ;;close
if(currentmacro) mac+ currentmacro ;;open current macro again

err+ end _error


Messages In This Thread
RE: Encrypt/decrypt QM item files or folders - by Kevin - 02-11-2023, 03:44 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)