Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FUNCTION QUESTION
#1
i have made a macro using functions but for some reason they wont shut of using the pause break on the keyboard or shut off till u exit the macro totally.......can some 1 help me in this area is there a command to add to the code or something i have not done im totally stuck
#2
You could make seperate macro with... shutdown -6 0 "your function" and assign a hotkey you want... thats a simple way i guess
#3
no i think i didnt exspalin myself very well i want the macro function to run till its performed its action soon as it has i want it to turn of automatically....by itself does that make it any clearer
#4
sounds like you made it a function.
only macros end with the Pause/break key.
An old blog on QM coding and automation.

The Macro Hook
#5
yes but is there a way of making the function turn of when u want it to ie.......is there another way of pause breaking a function other than pause break or exiting the macro completely
#6
if you want it to 'turn off' while it's in a rep loop you can use 'end' or 'break' at the appropriate time. or you can shut it off with another macro/function using 'shutdown'.

im not sure if youre confused about this point but 'pause/break' doesn't 'pause' the macro it ends it.
An old blog on QM coding and automation.

The Macro Hook
#7
UK_BAD_BOY Wrote:yes but is there a way of making the function turn of when u want it to ie.......is there another way of pause breaking a function other than pause break or exiting the macro completely

If I understand you correctly then I believe that Ken and Gin are right. If you wanted to make a function shut off like a macro would, just simply make another macro with:

Code:
Copy      Help
shutdown -6 0 "Functions Name Here"

inside of it and if you wanted just give the macro the trigger "G" to make it shutdown the function you assign with the Pause/Break key.
#8
Andy,

Just put this code somewhere in the function:

Code:
Copy      Help
ifk F12
,end

If that code is in a loop, then it will catch when the user hits F12 and then end. You can also create another macro that will call the shutdown as stated in a previous reply.

-kam
#9
THXS BRO WORKED A TREAT THXS FOR YOUR HELP


Forum Jump:


Users browsing this thread: 1 Guest(s)