Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2003, 01:04 PM
Junior Member
 
Join Date: Feb 2003
Posts: 4
Default passing variables on command line

Is it possible to read in variables passed in on the command line when I start my .exe

ie I have made an .exe but I would like to pass in a variable of an external file I wish it to read in.... this file varies each time so ideally i would like to be able to use:

movie.exe file=asdouhasoduha

or something similar.

Is this possible?
Reply With Quote
  #2 (permalink)  
Old 02-02-2003, 05:49 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: passing variables on command line

SWFKit treat the first argument not beginning with the slash('/') as the main movie:
Code:
movie.exe 1.swf
will use "1.swf" as the main movie. So if you want to handle any other arguments, let them begin with a slash:
Code:
movie.exe /file=asdouhasoduha
SWFKit does not provide any native object to retrieve the command line string yet. To make it works, we built a very simple ActiveX object called "CmdLine" for you. It has only one property "CmdLine", returns the command line string.
Code:
var cmdl = new ActiveXObject("CMDLINE.Commandline");

var clear_flag = false;

if (cmdl == null)
{
   var object = getAdditionalFile("objects\\cmdline.dll");
   ActiveXObject.register(object);
   cmdl = new ActiveXObject("CMDLINE.Commandline");
   
   clear_flag = true;
}

Dialogs.msgBox(cmdl.cmdline);


var wnd = getMainWnd();
wnd.onClose = function()
{
   if (clear_flag)
   {
      var object = getAdditionalFile("objects\\cmdline.dll");
      ActiveXObject.unregister(object);   
   }
}
The demo project and the "cmdline.dll" have been sent to your mailbox. If you want to get the source code of the cmdline object, please contact support@swfkit.com
Reply With Quote
  #3 (permalink)  
Old 02-07-2003, 08:51 AM
Member
 
Join Date: Jan 2003
Posts: 54
Default Re: passing variables on command line

???

i've tried the code above....
and the result4 "Dialogs.msgBox(cmdl.cmdline); "
is....undefined * * what ever i try:

movie.exe /smvar=toto
movie.exe \\smvar=toto
movie.exe smvar=toto

./. :-X

i launch one exe from an another, and have to give some parameters to the second.
Does it 'cause i use the trial, what ever i put for /show_flags / , (shell.run method, 0 >> 11) *it allways open a new window ?

./.

How can i know all the native dll (ie: to use as a new object in FFish... ) that is in swfkit ?




__________________
http://www.alyze.com - http://www.ecomzone.net - http://www.alisook.com -http://www.madcha.com - http://www.i-multimedia.fr -
Reply With Quote
  #4 (permalink)  
Old 02-27-2003, 10:24 PM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default Re: passing variables on command line

hi topcmm,

i tried you code with swfkit 1.0... but it doesnt work out... .do you have any solution to that version? coz m still using swfkit 1.0. would you plz solve this problem?

regards.
__________________
SWFBaz Preview [October 2006]
http://www.SWFBaz.com
Reply With Quote
  #5 (permalink)  
Old 03-04-2003, 04:21 PM
Member
 
Join Date: Jan 2003
Posts: 54
Default Re: passing variables on command line

Ouppps !!
Didn't get the last line :
""cmdline.dll" have been sent to your mailbox"
....
is there a way to have it too ?
__________________
http://www.alyze.com - http://www.ecomzone.net - http://www.alisook.com -http://www.madcha.com - http://www.i-multimedia.fr -
Reply With Quote
  #6 (permalink)  
Old 03-09-2003, 07:32 PM
Senior Member
 
Join Date: Jan 2001
Posts: 413
Default Re: passing variables on command line

here it is:

http://www.swfkit.com/download/demo/cmdline.zip

;D
Reply With Quote
  #7 (permalink)  
Old 03-18-2003, 06:01 PM
Member
 
Join Date: Jan 2003
Posts: 54
Default Re: passing variables on command line

TKs Daniel
.
.
Don't worry too much about all my qs.
i'm just a curius guy...not in the aim to make another swfkit (we're not dealing on the same highway, and this one is just too good) but only to push it out of its limits.
Even if some pitbull doesn't understand it...
.
I wish i can write down english the same way i do in french to tell you some more things that can (possibly)make swfkit better and better (tell all those people to come to a french forum and try to do the same.... :-/ , ...no matter it's not important...) but u can improve swfkit by yourself....
.
.
A FRENCH guy that love french patatoes...
But this is a another question.
But please...not use the name of God in what you say !
__________________
http://www.alyze.com - http://www.ecomzone.net - http://www.alisook.com -http://www.madcha.com - http://www.i-multimedia.fr -
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 03:13 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.