Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi All,
I love QM and have created many handy items. I need to get a running count of how many times various macros are being triggered so I can compare to old "pre-qm" days. Also any way to keep running log of cursor mileage or # of clicks? Again, for efficiency comparison?
Thanks so much.
S
Posts: 12,072
Threads: 140
Joined: Dec 2002
QM cannot provide this statistics.
Posts: 1,769
Threads: 410
Joined: Feb 2003
you can keep a log of your macros if you put some code in front to drop the time date into a file along with the name of the macro.
Posts: 1,006
Threads: 330
Joined: Mar 2007
I tried to do this with the following code:
str+ macro
str s
s.time("ddd',' MMM dd yyyy" "HH:mm
s")
run "Z:\QM\Macro Log.txt" "" "" "" 16
act win("Macro Log - Notepad" "Notepad")
'C(VK_END)
outp macro
'T
outp s
'Y
'Af
's
'A{F4}
I intended to have the macro be assinged the macro that I wanted logged by placing a macr.getmacro function in the actual macro.
2 problems however:
First, I couldn't use the getmacro string to properly recognize the current macro (I think default "" populates the string with the macro open in the editor but notthe macro that is running.
Second, it kind of worked but kept on putting the same previous macro used over and over again in the log. Do I need a kind-of clear string phrase?
Thanks for your input!
Posts: 1,769
Threads: 410
Joined: Feb 2003
instead of having something look at running macros.
how about putting this in the front of every macro you want to log.
str a="macro name here[]"
a.setfile("c:\logfile.txt" -1)