Open a linked file with double click on it.

Discuss any general programming issues here
Post Reply
User avatar
root
Posts: 23
Joined: Sun Feb 14, 2010 12:24 pm

Open a linked file with double click on it.

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

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

Post by root »

:cry: Huhu!
Is it not possible to use a Hollywood Programme as a default tool?

:?: :?: :?:
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

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

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

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

Post 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?
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

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

Post by PEB »

I'll try again too:
See the documentation for GetFileArgument().
Bugala
Posts: 1179
Joined: Sun Feb 14, 2010 7:11 pm

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

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