Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
End Macro w/ a text sensitive menu
#1
I havn't been able to figure out how to get the text menu's to "tie" into the main macro.

I have a macro w/ an infinite loop. I'd like to be able to just type a char sequence and disable (break) the loop.

I've created a folder with the main macro and then clicked on the macro and clicked New/New T.S Menu and added:

ff :ret

I also tried

ff: break

I even tied simple output just to see if it was hitting the menu:

ff: "hello world"


It doesn't seem to work. How do I relate the TS menu to the main macro? Is there a way to just end a macro with a hot key without a text sensitive menu? I couldn't find much searching through the help docs.
#2
Macro and TS menu run as two programs and know nothing about each other.

Here is simple method (F12 breaks loop):

Code:
Copy      Help
rep
,ifk(F12) break
, ...

If you want to use TS menu, they (macro and TS menu) can communicate through global variable:

Code:
Copy      Help
int+ breakloop=0
rep
,if(breakloop) break
, ...

Above is code for macro, below is TS menu item:

Code:
Copy      Help
ff :int+ breakloop=1
#3
I'm still not sure what I'm doing wrong. I've crated a test folder with the following 2 files:

Test Menu:
Code:
Copy      Help
done :int+ finished=1

Test Macro:
Code:
Copy      Help
spe 2000
run "notepad"
5 "Notepad"
0.5

int+ delay = 3
int+ finished = 0

rep
    if(finished) break
    outp "Finished ''%i'' []" finished
    wait(delay)

No matter what I type, it always repeats:

Finished 0

I've tried typing edone, done, etc. and it just keeps repeating. I know I'm missing a step here but I'm not sure where Sad
#4
Perhaps TS menu doesn't have trigger? Whole string that you must type to launch menu item consists of trigger and item label. Assign trigger, for example, hot-key d, and uncheck "Eat". Then TS menu item would be

Code:
Copy      Help
one :int+ finished=1


Forum Jump:


Users browsing this thread: 1 Guest(s)