Page 1 of 1

Open a linked file with double click on it.

Posted: Thu Sep 06, 2012 1:44 pm
by root
Hi all
I want to load a file into my Hollywood application, when i open the file.

I linked the target file like "test.txt" to my program, the program will be started but the file be not loaded.
So what do I do that the file will be invited?

I hope someone understand me. :roll:

Re: Open a linked file with double click on it.

Posted: Mon Sep 10, 2012 3:23 pm
by root
:cry: Huhu!
Is it not possible to use a Hollywood Programme as a default tool?

:?: :?: :?:

Re: Open a linked file with double click on it.

Posted: Mon Sep 10, 2012 5:48 pm
by PEB
If I understand your question correctly, what you want to use is GetFileArgument()---see documentation.
(You don't need to "link" any files to use this function.)

Re: Open a linked file with double click on it.

Posted: Mon Sep 10, 2012 7:59 pm
by root
I'll try again.

In the AmigaOS there is Deficon.
They specify what program is to be used to open a specific data types.

for example:
* bmp -.> Multivew will launch and display the image
When I replaced MultiView with my program then just start the program, but the picture is not Displayed.
How can I handle the picture so that it is loaded?

Re: Open a linked file with double click on it.

Posted: Mon Sep 10, 2012 11:44 pm
by PEB
I'll try again too:
See the documentation for GetFileArgument().

Re: Open a linked file with double click on it.

Posted: Tue Sep 11, 2012 11:30 am
by Bugala
Yes, GetFileArgument seems like the answer to your question.

Not sure how it exactly works, but idea is following:

First i make a program with Hollywood called "myhollymultiview", in that program i use that GetFileArgument, to get the info i want from files i use it for. And I compile it to make an exe of it.

Then I use deficon and tell it that all jpg files are to be opened with "myhollymultiview.exe".

Finally i got and open file "mypicture.jpg".


What should now happen is that mypciture.jpg will start program "myhollymultiview.exe" and it will use the GetFileArgument to figure out what it should do with that file.

And if my program works correctly, it would display the picture.