"Open with arguments" Option

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
TestMeister
Posts: 188
Joined: 04 Feb 2008 20:17

"Open with arguments" Option

Post 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!

highend
Posts: 13308
Joined: 06 Feb 2011 00:33

Re: "Open with arguments" Option

Post 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...
One of my scripts helped you out? Please donate via Paypal

TestMeister
Posts: 188
Joined: 04 Feb 2008 20:17

Re: "Open with arguments" Option

Post 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

highend
Posts: 13308
Joined: 06 Feb 2011 00:33

Re: "Open with arguments" Option

Post 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""";
One of my scripts helped you out? Please donate via Paypal

TestMeister
Posts: 188
Joined: 04 Feb 2008 20:17

Re: "Open with arguments" Option

Post 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:

Post Reply