Page 1 of 1

Open with

Posted: Sun Feb 06, 2022 6:40 pm
by Flinx
Hello

Is there a way in Windows to read the arguments at program startup (from pCmdLine of wWinMain or so) so that a Hollywood program could be used with "Open with"? If not, that would be a candidate for my wish list, although I don't know if there exists an equivalent function in all other supported operating systems.

Ralf

Re: Open with

Posted: Sun Feb 13, 2022 2:05 pm
by root

Re: Open with

Posted: Sun Feb 13, 2022 4:50 pm
by Flinx
Hi root

This seems to be only for the console start.

Ralf

Re: Open with

Posted: Sun Feb 13, 2022 5:13 pm
by airsoftsoftwair
What about GetFileArgument()?

Re: Open with

Posted: Sun Feb 13, 2022 9:09 pm
by Flinx
Hi Andreas

This works, at least with a single argument. (And the most Windows users don't know how to submit multiple arguments...)
Thank you!

Ralf

Re: Open with

Posted: Thu Nov 17, 2022 5:34 pm
by Flinx
Here I have underestimated the Windows users. One of my beta testers has already asked me why he can't select multiple files in the explorer and then play them with the player. If at some point is a lot of time left...

Re: Open with

Posted: Thu Nov 17, 2022 7:23 pm
by airsoftsoftwair
Yes, should be possible to add.

Re: Open with

Posted: Thu Nov 17, 2022 10:19 pm
by plouf
the above fix should be, imho, in conjunction with this viewtopic.php?t=3603&start=10

where the most appropriate solution is a way to get full command line in raw mode, covering all possible problems in future

Re: Open with

Posted: Fri Dec 23, 2022 1:03 pm
by airsoftsoftwair

Code: Select all

- New: Added GetRawArguments() function; this can be used to get all arguments passed to your program or
  script either via the console or via Workbench on Amiga or via the Shell API on Windows; the arguments
  will be returned in a table and will also include arguments parsed by Hollywood, e.g. "-window" or
  "-quiet"; the first table entry will always contain the name of the program; note that this will not
  necessarily contain a qualified path but just the name of the program as it was called on the console;
  GetRawArguments() can be useful if your script should be capable of handling multiple file arguments;
  GetFileArgument() will only allow you to get the very first file passed to your program but by using
  GetRawArguments() you can also support multiple file arguments