Running Batch command with JSFL

With a need to copy-paste a lot of files to a lot of different places in a lot of different workstations, came an idea. How to automate these? In a typical flash development environment, where designers and developers constantly negotiating to bring out the best in themselves,one cannot deny the flashIde. Ultimately working on a development framework will make the situation a little complicated. One has to publish the individual SWFs, then copy-paste to the desired folders,then run the framework ui to see the swfs working(or fail). Over a period of time this either becomes habit or pain in a*$. So the point is if at all I need to use FlashIde, I will take full advantage of it.
This is where JSFL comes handy on FlashIde, think of this as ANT build tool on eclipse. While building my automation process, I stucked at how can I run a batch file from jsfl?! There is a cool undocumented command available just for this named,   “FLfile.runCommandLine()”   . Now evening is in place, I have a batch file which will takecare of my copy paste task. Then also I have to leave my Ide to double click run the file hamperig my productivity. Unfortunately flashIde does not provide any short-cuts to run a batch file or any system command. So with this command in place,I wrote down a simple JSFL file. Put that on commands folder, and now I can run the jsfl which fires up my batch file and ultimately updates my local test environment. While all this is fine, still I need to catch up my mouse and go to commands menu and fire the jsfl. After pressing SHFT+F12 several times to publish several of files, its little uneasy to get mouse and go to commands. So lastly adding a short-cut for my new command completes the process.
I am so much happy for this one,

Ref :

1. http://www.asvguy.com/2004/07/undocumented_fl.html

2. http://www.flashguru.co.uk/jsfl-flfileruncommandline-updated-in-flash-cs3
Happy flashing :)

Advertisements

One thought on “Running Batch command with JSFL

  1. “After pressing SHFT+F12 several times to publish several files”

    you can actually publish in jsfl aswell

    var doc = fl.openDocument(flaURI);
    doc.publish();

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s