PDA

View Full Version : arguments in fscommand


italie
02-25-2008, 06:40 AM
I understand that fscommand has slowly been stripped down for security reasons. What I'm trying to accomplish seems next to impossible without the ablity to pass arguments in it however. Wondering if anyone has an idea as to a better way to pass a variable argument in fscommand? Jtools or zinc worth it?

ex:
fscommand("exec", "filename.exe argument");

CyanBlue
02-25-2008, 02:17 PM
Howdy and Welcome... :)

Yup... You do need a third party projector tool for that...

italie
02-25-2008, 05:50 PM
Can you reccomend one? The two I've mentioned are the only ones I'm aware of, never used either.

Looking for the arguments passed to the exec app to be variable, is that possible still?

Thanks.

CyanBlue
02-25-2008, 06:17 PM
SWF Studio is the one northcode created... He should be able to give you more insight on that... He also have several replys with the same information that you are seeking...

northcode
02-25-2008, 06:37 PM
You aleady knew this, but you can't use arguments in FSCommands at all in regular Flash projectors (since Flash MX hit the street). You can cheat if you don't need truly variable arguments by using BAT files. You can read all about it in this post from my blog.

Conquering FSCommand EXEC Part 1 : Proxy (http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy)

The BAT file trick works if you can enumerate all the combinations of files you want to execute or open and their parameters. If you need to vary the parameters based on user input then you're going to need some outside help. Here's a list of some third party swf2exe tools.

SWF Studio http://www.northcode.com (my baby)
mProjector http://www.screentime.com
SWFKit http://www.swfkit.com
Jugglor http://www.jugglor.com
Zinc http://www.multidmedia.com

In SWF Studio you can launch an application with parameters like this...

var myArgs = "one two three whatever...";

ssCore.Shell.execute (http://www.northcode.com/v3/help/index.html?page=ssCore_Shell_execute.html)({path:"startdir://theapp.exe", arguments:myArgs});

There are a pile of other arguments to ssCore.Shell.execute that you can use (check out the link).

SWF Studio uses a unique calling convention. You don't just supply positional arguments like most APIs, our parameters are all passed as objects. So you specify parameters by their names instead of their position in the call. It's a bit strange at first, but this allows us to do some very cool things.

We can add new parameters to commands without breaking all your existing code. You don't have to worry about the order you pass your parameters, just the name and you can omit optional parameters from the call. Shell.execute has 15 parameters but only the path (to the EXE) is required. Use as much or as little power as you need.

Feel free to stop by our forums if you have more specific questions about SWF Studio :)

http://www.northcode.com/forums

italie
03-23-2008, 05:30 AM
Thank you very much for the reply, and for the very easy to use software. Works like a charm with the trial version of swfstudio.

Unfortunatly I'm not in a position to spend $300 on a personal use hobby project, so I may have to scour around for cheaper alternatives. Great program though, and thanks again for the advice.