I guess this is not possible on windows, since it returns n = 0?
I don't know much about windows, but is it possible somehow to know, if a file was opened with a hollywood app?
For instance, me and my friend have done a small image viewer app, and he wants to be able to use it as his standard tool for opening images.
GetCommandLine() on Windows?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: GetCommandLine() on Windows?
GetCommandLine() works on Windows but not for your purpose. The problem is that GetCommandLine() only returns arguments that are passed to the app in the form of hyphenated arguments, i.e.
GetCommandLine() will handle -arg1 to -arg3 just fine but not the filename argument because it is always passed to the app directly and not in a hyphenated form. I might add a new function for this in the future so that you will also be able to read the filename passed to compiled Hollywood scripts. This is currently not implemented because it's not always so easy. On Amiga one has to distinguish between CLI and WB start and on Mac OS X the filename is passed as a special Apple Finder event etc. But it might be added in the future.
Code: Select all
myapp.exe filename -arg1 val1 -arg2 val2 -arg3 val3
Re: GetCommandLine() on Windows?
Ok, thanks for the response. I really hope to see something like that implemented in a later version!
Re: GetCommandLine() on Windows?
Code: Select all
- New: GetFileArgument() allows you to retrieve the file argument passed to a compiled Hollywood
script; useful if you want to develop an application that should be used as a default tool
for a certain file type etc.; this function will only work correctly with compiled scripts;
for normal scripts, it will always return "" (empty string) (requested by Alfkil Wennermark)