Trigger Push2run from pc

Here you are welcome to discuss items of general interest related to Push2Run
Post Reply
dollanaire
Posts: 7
Joined: Sun Oct 30, 2022 9:50 pm

Trigger Push2run from pc

Post by dollanaire »

Does anyone know of a way to type in a command to trigger it on the pc? I would like to say hit a hotkey to open a prompt on the pc and type in the command and it triggers this way as well... I know you can hit f12 to run from push2run but I would like something outside of the program on pc if possible. Thanks!
LazySpaniard
Posts: 16
Joined: Mon Dec 19, 2022 12:22 am

Re: Trigger Push2run from pc

Post by LazySpaniard »

The Push2Run application can take arguments as command inputs. See this part of the help page:
https://www.push2run.com/help_v3.6.2.0. ... and%20line

It can be utilized in a number of ways, but the simplest is to make a batch file and stick it in an environmental path so you can execute it from your Start > Run (Win + R) prompt.

Simple batch file example:

Code: Select all

"C:\Program Files\Push2Run\Push2Run.exe" %*
After saving it in an environmental path, you'd run it like so.

Code: Select all

BatchFileName command goes here
I'm not fond of how this behaves without an argument so it would need to be adjusted to work better.

If you're insistant on having it prompt you after a key combination press, you'll need to add some logic to prompt you if no arguments are passed. Then you can paste a shortcut of it in your start menu somewhere and add a hotkey in the shortcut's properties.

Another option I'm fond of it using a batch file that triggers a PowerShell script and handle the lack of arguments there.

Simple powershell script:

Code: Select all

if (-not $args) {
    $args = Read-Host "Input command"
}
& "C:\Program Files\Push2Run\Push2Run.exe" $args

You could also try comforming to whatever trigger method you have set in your optoins and programmatically forward your command to it.

Alternatively, if you're interested, I'm developping a method of sending voice commands to Push2Run via Amazon's Alexa digital assistant.
https://www.push2run.com/phpbb/viewtopic.php?t=1116
Post Reply