Bring window to front

Discussion, questions and support.
Post Reply
spotticus
Posts: 7
Joined: Oct 15th, ’19, 17:44

Post by spotticus » Nov 8th, ’19, 18:39

I created a shortcut to open a program. It does cause the program to open, but it doesn't bring its window to the front. How do I make the shortcut open the program and bring it to the front (i.e. make it the active window)? Also, in general, how do you tell the computer to make a particular window the up front active window? Thanks!
User avatar
Tom
Posts: 312
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 9th, ’19, 22:04

This is an operating system issue. Try to use another shortcut (avoid Alt and Win modifiers).
Or use this:

Code: Select all

Run, "C:\Program Files (x86)\Folder\software.exe",,, OutputVarPID
WinWait, ahk_pid %OutputVarPID%
WinActivate, ahk_pid %OutputVarPID% 
https://www.autohotkey.com/docs/command ... tivate.htm
spotticus
Posts: 7
Joined: Oct 15th, ’19, 17:44

Post by spotticus » Nov 11th, ’19, 17:53

The shortcut I am using is the F6 function key. I am trying to have it open C:\Program Files (x86)\Dentrix\Office.exe - I tried to implement your code but I must be doing something wrong because it is giving me an error and won't even let me save it.
User avatar
Marko
Posts: 1063
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Nov 11th, ’19, 22:36

You need to use Type: Command.
Post Reply