Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
encrypt decrypt a function from another function
#1
can some 1 give me a code of how 2 decrypt a function from another function then encrypt it again
#2

I would suggest using Johns Encrypt/Decrypt Function.


Auto Encrypt Decrypt
Taking on Quick Macros one day at a time
#3
yeah i looked at that but i need 2 do it on the fly programatically
#4
i think i just read something about this earlier ill try and find it again see if its what u mean
#5
i dont think this will help but maybe you can do this with exsisting items and some how use a decrypted macros has template then when you want it encrypted use a encrypted macros has template i dnt have a clue how to code it or even if it would work


Quote:Gintaras
Site Admin

--------------------------------------------------------------------------------

Use an encrypted macro as template. Then the new macro also will be encrypted.

newitem "name" "text" "encrypted item"
#6
Kevin Wrote:yeah i looked at that but i need 2 do it on the fly programatically

As of now there is no way of programmatically decrypted a macro or function, you can use newitem to make a new function that copies the encryption of another function.
http://www.quickmacros.com/forum/showthr...p?tid=1303
#7
Try to automate encryption/decryption using the Options dialog.

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 2010 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
#8
wow great code there gint...not just used to do wut u made it for but soem interesting stuff in there Big Grin 8)
#9
ty vm this will work perfectly for what i need 2 do 1 note though
if users are using any version below 2.2
they need to remove this line from the code or it will error each time
; password.setwintext(id(1053 w2))
#10
This should be compatible with all versions

password.setwintext(id(1051 w2)); password.setwintext(id(1053 w2)); err ;;enter password
#11
When I use the code listed i get an error
Code:
Copy      Help
Error (RT) in EncryptDecryptMacro:  exception
I can get it to work when i take out
Code:
Copy      Help
end _error
but it will keep running so i have to shut Qm down is there any hints you can tell me i am using
version 2.1.9.1 would that have something to do with it.
#12
Download the latest version of QM and try it again. Post back and let us know if it works or not.
Taking on Quick Macros one day at a time
#13
I have updated and still same problem. So i uninstalled everything rebooted then installed Version 2.2.1.5 and still same problem. Anymore ideas?? And Thank you for the help
#14
Quote:but it will keep running

where it stops?
To discover it, you can insert this at the beginning: Deb 100
Or insert out 1, out 2 ... in several places.
#15
Got IT thank you very much. This is great.


Forum Jump:


Users browsing this thread: 2 Guest(s)