The Daily Click ::. Forums ::. Klik Coding Help ::. Opening a file linked to MMF
 

Post Reply  Post Oekaki 
 

Posted By Message

Simon Colmer

Your friendly neighbourhood spiderman

Registered
  05/02/2003
Points
  2379

Game of the Week WinnerSecond GOTW AwardGuy with a HatI love firefox!VIP Member
7th July, 2006 at 15:04:29 -

Hey, i have been trying to figure out how to make an associated file open a MMF application with the correct commandline properties to link to the original file being opened.

Sorry for the crap explanation, heres an example:
I use the YASO object to associate the file extension *.j34 with my application. Now whenever you double click on a file with the extension *.j34 then it opens up my application, but how do i find out what file was clicked on so my application can load it? I have looked in the commandline and find nothing, any help or examples out there as i have tried lots!!
Thanks guys, Si xx

edit: here is an example file, first open the exe, then close it, then open the .j34 file and it will launch the application, but i cant find any command line or anything indicating what file to load! http://x-volt.com/software/problem.zip

Image Edited by the Author.

 
http://www.x-volt.com

DELETED!_by account owner



Registered
  04/03/2006
Points
  1155
23rd July, 2006 at 04:05:48 -

i have the same problem. I have a million cool things i could do if i knew how to do this.

BUMP!

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
24th July, 2006 at 05:24:13 -

Are you using Commandline objects Associate function? In any case, the associasion is incorrectl... if you check the .a33 extension you see that it only executes the exe, it doesn't add the file itself as an commandline... in short, the problem is where you associate the file extension, not where you open the file...

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
24th July, 2006 at 12:07:17 -

Answer by Yves
In the Associate action of the YASO object, in the "Path of executable" parameter, try the following expression:

""""+Appdrive$+Appdir$+"yourapp.exe"+""""+" ""%1"""

-------------------------------------------------------------------------------------------

Just tried it myself and it works

 
This is a signature. Have this one on me.

Werbad



Registered
  18/09/2002
Points
  235
24th July, 2006 at 12:44:40 -

Yup, thats exactly whats wrong! But you can use apppath$ + ".exe" instead of appdrive$ + appdir$ + "nameofapp.exe"
Btw, the Commandline object also allows you to register file extensions

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
28th July, 2006 at 18:51:42 -

Question, everytime I open up the file with the extension, nothing opens up. Any idea's?

 
http://www.facebook.com/truediamondgame

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
29th July, 2006 at 04:19:38 -

You've done it wrong then
Have you correctly identified your executable?
Have you run the exe first to add the correct values to registry and all that?

Image Edited by the Author.

 
This is a signature. Have this one on me.

Werbad



Registered
  18/09/2002
Points
  235
29th July, 2006 at 10:35:01 -

Well, he did post a file that didn't work... An he wanted to know why.
No suprise it didn't work then, right?


 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
29th July, 2006 at 11:19:58 -

I'm replying to Brandon's post.. right?

Image Edited by the Author.

 
This is a signature. Have this one on me.

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
29th July, 2006 at 16:22:37 -

I've even assigned my EXE file by going into folder options, finding the file name, then actually going to BROWSE and FINDING my EXE, then assigning it. And it STILL didn't want to open up my EXE, let alone make it so that I can detect the name of the file that opened it. I'm at a total loss here, I have no clue what it's doing.

 
http://www.facebook.com/truediamondgame

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
30th July, 2006 at 02:02:28 -

Have you tried using the browse thing with a different exe?
Just if you assigned it wrong the first time, using the browse thing might not fix it. So try it with a different exe. If that doesn't work then your computer is probably messed somehow, I dont know

 
This is a signature. Have this one on me.

Werbad



Registered
  18/09/2002
Points
  235
30th July, 2006 at 15:29:42 -

as said before, at file associations, make sure the commandline isnt just your exe file... i needs to be "exepath\name.exe" "%1"
the "%1" part is VERY important

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
30th July, 2006 at 16:00:20 -

No he's not having a problem with the commandline - he can't even get his exe to open.

 
This is a signature. Have this one on me.
   

Post Reply



 



Advertisement

Worth A Click