Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run a command on inactive user.
#1
HI
I have a wierd situation here. Ill try to explain as best I can.


I am logged into user 1 and user 2 on my pc. I have qm going on user 2 even through its inactive because user 1 is active. Instead of switching from user 1 to user 2 to start a function manually is it possible to start the funtion on user 2 using qm on user 1 without switching users or activating user 2.




Is this at all possible. It sucks having to switch users to start a function manually.
#2
You can use file trigger. The trigger string of the macro (macro1) can be:

$f 0x18 "$Common Start Menu$\Programs\Quick Macros 2" "Help.lnk"

(paste it in the edit field on the QM main toolbar)

To launch the macro from other (or same) user, run this macro (macro2):

Code:
Copy      Help
SetAttr "$Common Start Menu$\Programs\Quick Macros 2\Help.lnk" FILE_ATTRIBUTE_ARCHIVE 1

macro2 modifies file attributes, and then runs macro1.

When you run macro2, macro1 runs in current user too, unless you use other macro list file. To avoid it, macro1 can check user name:

Code:
Copy      Help
str s
GetUserComputer s
if(s~"User"=0) ret ;;exit if current user is not "User"
#3
I tryed that but for some reason running macro2 does not trigger macro1. not sure why not.

hope to hear from you soon.

thanks
#4
My bad, I got it to work. Quite cool.


thanks for the help.
#5
OK< i dont understand this Sad, say im on user "Sam" and i want to run a macro on user "Ryan", from user "Sam" Can you show me the code to do this?
#6

Just put Macro1 on the user you want to run the macro on and put Macro2 on the user you want to trigger Macro1 with. What is going to happen is when you run Macro2 it modifies the attributes of the file which will then trigger the macro on the other user, that has Macro1.


Macro ( Macro490 )
Code:
Copy      Help
str s
GetUserComputer s
if(s~"Sam"=0) ret ;;exit if current user is not "User"

This code is just used to check if the current user, you're on, matches the user you have filled in, inside the macro.
Taking on Quick Macros one day at a time
#7
ok so how do i actually run the macro on the other user? thats where im lost Sad


Forum Jump:


Users browsing this thread: 1 Guest(s)