SysInfo.findprocess help request

From changelog: "Added @ifrunning command modifier (and SysInfo.FindProcess script method)."

@ifrunning works nice, but I need also check if function is call by hotkey or by button. I made script based on previously published solution (for detect process), but now I want to use that SysInfo.FindProcess method.

Can you, please, write one or two lines of code how to use that new function in VBA? I spend some time reading help but I think more examples for functions will be more useful (like in VBA help was - every described function has an example how to use it - it's really helpful).

I know that it's all about my lack of programming skills, but I'm trying.

It returns a PID if the process is running, and 0 otherwise:

Work with JS, thank you.
In VB it shows error: "A method was called unexpectedly (0x8000ffff)"
(si = DOpus.Create.SysInfo)

You have to use Set in VBScript if you are storing an object in a variable, because VBScript is a stupid language. :slight_smile:

Thank you.

OT: what about expanding Opus help with script examples (for all functions) in the future? It may help basic users make their own scripts, not only experienced programmers. It's a lot of work, I know, but can be useful.

Too time consuming, especially when most examples would just be calling the function like above, and anything complex is better served by examples people can find on the forum.

We aren't intending to teach people the basics of how to program VBScript or JScript, either; that is way beyond the scope of the Opus manual.