Launche/Switch Script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mikagenic
Posts: 93
Joined: 16 Sep 2014, 18:26

Launche/Switch Script

10 Jun 2017, 07:32

I have a script in mind, and wanted to get some feedback, mainly - does a script like that already exist and otherwise how would I go around writing it ...

Basically I want the script to read a configuration file that will have a list of key names and the programs to launch/switch to if the key is pressed (I am mainly interested in the numpad keys)

A program will be identified by both an executable file path and optionally a window title mask so that it can point to a specific chrome tab for example.

On pressing the key the script will do the following:

- if there is no currently running process of the matching executable file path, start one and switch to it

- if the currently active process is not a match, but there are matches, switch to the first match (in order of creation or in order they are in the task bar), looping through the matches.

- if the currently active process is a match, and there are other matches, switch to the next one (in order as above)

- otherwise (only one instance that is currently active) do nothing


For example if numpad 5 is associated with visual studio (.../devenv.exe), then pressing numpad5 will start visual studio if it's not running, or switch to the first / next running instance if there are one or more running.
If numpad 3 is associated with chrome and tab gmail it will start/switch to that tab.

I hope that this is clear. Any pointers/code very appreciated.

Thx!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], fiendhunter, mikeyww, Rohwedder and 331 guests