Open with

Discuss any general programming issues here
Post Reply
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Open with

Post 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
User avatar
root
Posts: 23
Joined: Sun Feb 14, 2010 12:24 pm

Re: Open with

Post by root »

Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: Open with

Post by Flinx »

Hi root

This seems to be only for the console start.

Ralf
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Open with

Post by airsoftsoftwair »

What about GetFileArgument()?
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: Open with

Post 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
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: Open with

Post 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...
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Open with

Post by airsoftsoftwair »

Yes, should be possible to add.
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Open with

Post 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
Christos
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Open with

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