Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Process User Name
#4
Hello,

I found the above example and would like the ability to output the Client Name found under the Users tab in Windows Task Manager instead of the User.

Im trying to display the application used by a remote user (remote desktop) to other users that connect afterwards.

For example:
User1 connect to a remote server and opens ms paint, then when User2 connected to the same server, I would like the screen to flash "MSPAINT used by User1" on User2's screen.

I have the following script working so far with the above example and Member function str.GetProcessUserName

Macro
Code:
Copy      Help
out
str s

rep()
    if(ProcessNameToId("mspaint") = 0)
        wait 2
        out "Paint is not used"
    else
        if(!s.GetProcessUserName(ProcessNameToId("mspaint") 1)) ret
        wait 2
        OnScreenDisplay(F"Paint used by {s}" 1 0 1 "comic sans ms" 25 0x0000ff 0 "FF_Start")

If im going about this completely wrong, please help me get back on track.

Thanks!!!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)