Page 1 of 1

"Open with arguments" Option

Posted: 14 May 2017 23:52
by TestMeister
I frequently launch programs with arguments so looking for a faster way to invoke vs Menu\File approach.

Is it possible to add this to the context menu?
If not, is there a scripting option that can be added as a custom toolbar item? You would first select the file, then select the tool bar item to get the XY "Open with arguments" dialogue, then XY would execute using the PFA and the input arguments.

Unless I missed this, I did not see this option documented in the script commands.

Thanks!

Re: "Open with arguments" Option

Posted: 14 May 2017 23:57
by highend
You can't add context menus on your own

- What are you selecting, exe or any type of data file?
- With which application should this file be opened, one, that you define or the windows registered one?

Maybe give a real world example...

Re: "Open with arguments" Option

Posted: 15 May 2017 01:50
by TestMeister
I would be selecting an executable and it would work the same way it does off the menu: File\Open with Arguments
If opening a file, as above it would use the program registered with Windows

Example: select Chrome.exe
Select tool bar button to "Open with Arguments"
Input: --disable-extensions

Chrome loads with extensions disabled

Re: "Open with arguments" Option

Posted: 15 May 2017 08:11
by highend
A way to do it with a PFA entry:

Code: Select all

|"Run with arguments" exe>::$args = input("Enter arguments"); run """<curitem>"" ""$args""";
You right click the item, "Open with..." -> "Run with arguments"
Enter your arguments, hit enter...

The code to use it on a button is nearly the same:

Code: Select all

    $args = input("Enter arguments");
    run """<curitem>"" ""$args""";

Re: "Open with arguments" Option

Posted: 16 May 2017 04:40
by TestMeister
Perfect, the PFA option is just what I was looking for where the interface focus stays on the selected file without moving off to the toolbar. I was completely unfamiliar with the PFA so many thanks for posting your script which works perfectly!
A 5-star response indeed! :appl: