Posts: 1,769
Threads: 410
Joined: Feb 2003
Is there a way I can disable all my macros or just some by using the login id as the determination? i would like my menus etc not to be popping up all over the place bugging my wife.
Thanks.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Maybe better would be to use different macro files. Disabling/enabling also is possible. Place this code in function init2 (if init2 function does not exist, create):
str user
GetUserComputer user
;for older QM versions, instead of GetUserComputer use this:
;int nn=257
;if(!GetUserName(user.all(nn) &nn)) ret
;user.fix(nn-1)
sel user
,case "User 1"
,dis+ "macro or folder" 2 ;;disable
,case "User 2"
,dis- "macro or folder" 2 ;;enable
,;...
Posts: 1,769
Threads: 410
Joined: Feb 2003
I forgot to mention that we do alot of "switch user" rather than the "logoff." Is there a way to trigger this when the user "returns" to an already logged in session?
Thanks.
Posts: 1,769
Threads: 410
Joined: Feb 2003
nah, that's ok.
I can code up a macro that will do it for me me in a quick and dirty way and then....hey wait a minute...
disable my macros
enable her macros
'Wl
disable her macros
enable mine macros
'Wl
drop this on the start menu instead of the logoff option and "you got yourself a witches brew."!
Posts: 12,140
Threads: 142
Joined: Dec 2002
I deleted my previous post because it was not true. You don't have to restart QM, because then two independent QM instances are running. However, I never tested whether it is safe. And something does not work, for example, running macros from other computers (net).