Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2007, 08:25 AM
Junior Member
 
Join Date: Apr 2007
Posts: 22
Default Passing variables to newly opened EXE

I have 2 exe files created with SWFKit. The 2nd EXE is supposed to open from the 1st exe. The problem is that I want the 1st EXE to pass variables to the 2nd EXE.

How can I do that?

----------------
second question (associated with the same problem)

Currently I am writing a txt file and when I open the second EXE i read that file and get the data(then I delete it). The problem is that if there is a time delay to the writing of the txt file from the 1st EXE the 2nd EXE will open, will not find the file and "die".

So the question is can I write data in a file, CONFIRM that it has been written and the file exists and ONLY then open the 2nd EXE?

Thanx in advance...
Reply With Quote
  #2 (permalink)  
Old 04-13-2007, 01:34 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Passing variables to newly opened EXE

To ensure that the txt file has been created, you just need to call the Shell.run method after the FileStream object has been closed
Code:
import SWFKit.*;

var fs = new FileStream(getAppDir() + "1.txt", "w");
fs.write("blahblahblah");
...
fs.close();
fs.Release();

Shell.run(_root.$EXE + " " + getAppDir() + "1.txt");
Reply With Quote
  #3 (permalink)  
Old 04-13-2007, 01:37 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Passing variables to newly opened EXE

In the second EXE, you can use the "Application.cmdItems" property to get the command line arguments.

Code:
import SWFKit.*;

var txtToOpen = Application.cmdItems[0];
...
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:14 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.