Open same instance of a program

Discussion, questions and support.
Post Reply
danielzs
Posts: 1
Joined: Aug 27th, ’18, 11:04

Post by danielzs » Aug 27th, ’18, 11:09

Hello everyone!

I have a dedicated shortcut for calc on my keyboard. However, I wanted Fastkeys open same instance of the calculator every time I press the key, instead of opening a new instance of the program.

Is there a way Fastkeys could do this?

Thanks!
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Aug 27th, ’18, 18:47

Type: Command

Code: Select all

if not WinExist("Calculator") 
    run calc.exe
else
    WinActivate, Calculator
Post Reply