Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
envoking functions that will run independantly of calling ma
#1
Hello, I would like to know if it is possible to envoice a function from a macro, which spawns another process running that function so that control immediately returns back to the macro, regardless of the state of the function. Simplistically I have a code piece as an example:

myfun is a function that has this in it

Code:
Copy      Help
int t
for t 1 100000
,out "The function is running - %d" t
,wait 1


then the macro would be

Code:
Copy      Help
myfun
rep 100
,out "Testing call to function"


In this example you should see the following in the output window (note that the print order is not significant, just trying to give an idea):

The function is running - 1
The function is running - 2
Testing call to function
The function is running - 3
Testing call to function
Testing call to function
Testing call to function
Testing call to function
The function is running - 4
......
The function is running - 100000

The main jist is that the macro and functions are now running independantly.

Can this be done, and if so, how?

Thank you for your advice.

-kam


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)