Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting a variable from different function
#1
Ok.. i made a macro. now I want to encrypt it but I still want the user to be able to change some things in it like the speed and repeats. how do I go about setting that up. I know I probably need to put the spe and repeats in a different function and declare them in the encrypted macro but I dont know how to do that.. help.

thanks
#2
Convert the macro to function. Create other macro (not encrypted) that calls the function and passes these values as arguments to the encrypted function. The beginning of the function may look like this:

function Spead Repeats


Or, use global variables. Encrypted macro example:

int+ g_xxx_speed g_xxx_repeats
;now use these variables

Other macro example:

int+ g_xxx_speed g_xxx_repeats
;now assign values to these variables
#3
sorry Im stupid and lost..

here is a simple function. lets say I want to encrypt it but still change things, like the
key 123456
and the
wait

how do I call it from a different function..
#4
ooopps heres the function

act "Notepad"

rep

key 123456

wait 10
#5
the answer to your problems is: Get used to using variables.....
Well thats all for now, 3M
#6
smart observation.

Im trying bro.
#7
nate Wrote:smart observation.

Im trying bro.
ok let me see..uhmm
The function you gave above is not a realy function so let me create one for you.

Your macro:
Code:
Copy      Help
fKeyIt("123456", 10)
The "fKeyIt" function:
Code:
Copy      Help
function str'sText long'dDelay
act "Notepad"
rep
    key (sText)
    wait dDelay
Thats how to use variables and pass values to functions and use them...
You can now encrypt the "fKeyIt" function, while still alowing the users to modify thing in the maco calling it...
PS: That function will keep running infinitly unless you manualy stop the thread...
Well thats all for now, 3M


Forum Jump:


Users browsing this thread: 1 Guest(s)