Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-10-2007, 11:50 PM
Junior Member
 
Join Date: Mar 2007
Posts: 3
Default Run with Arguments

I'm creating and application with SwfKit that allows you to open and modify a specially formatted XML document. I'm wondering how I can launch the application with one of the xml files as an argument. Similar to the way you can select a .txt file and "open with" notepad, I'd like to be able to select and xml document and say "open with" MyApp.exe. Or likewise I'd like to be able to lauch the program from the command line with an xml document as the argument (i.e. "c:\MyApp.exe c:\SomeFile.xml").

I guess I'm just not sure what object exposes any additional arguments passed into my executable.


Thanks in advance,

--carriker
Reply With Quote
  #2 (permalink)  
Old 12-12-2007, 05:58 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Run with Arguments

Yes, please use the Application.cmdItems property

Code:
var file = Application.cmdItems[0];

if (Files.exists(file)) {
  // open the file and modify it
}
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:42 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.