Does anyone knows if it is possible (and if it is, how it is done) to send
parameters to a director projector (like movie1.exe).
I needed to load several instances of the same movie, each with a different
parameter. For exemple:
movie1.exe Ivan
movie1.exe Paulo
movie1.exe Jayme
and so on.
But I have no idea of how I could detect these comand line parameters using
lingo. I am used to writing programs in other languages and all of them have
some way of doing it.
I have seen commands that do this kind of thing for shockwave movies, but I
have to use a projector in this case.
Thanks,
Ivan
iv...@lobo.cx
The Xtra is free of charge if you only use max. two commands
per projector. I recommend buying it though, since it contains
things you don't want to live without when authoring in Lingo.
theLingorian
> But I have no idea of how I could detect these comand line parameters using
> lingo. I am used to writing programs in other languages and all of them have
> some way of doing it.
> I have seen commands that do this kind of thing for shockwave movies, but I
> have to use a projector in this case.
There's an undocumented property called 'the commandLine' at least in
Director 7 and 8. I've never used it, but I wouldn't be surprised if it
did exactly what you're after. Try it out and let us know.
--
_____________
Brennan Young
Artist, Composer and Multimedia programmer
mailto:bre...@young.net
Someone asked Mulla Nasrudin what his house was like. In reply he
brought this man a brick, saying: 'It is just a collection of these.'
:-)
theLingorian
Heh heh. With a Ouija board.
No seriously, I snapped 'the commandLine' up by using the 'DumpSymbol'
Xtra available from
I installed the Xtra, I then ran this script in an otherwise empty movie
(using a movie with existing code will skew the result because all your
handler names will have entered the symbol table).
on dumpAllSymbols
scr = "on getSymbol i" & return
scr = scr &" case i of" & return
repeat with n = 1 to 2236
scr = scr &" " & n & ": return #" & DumpSymbol(n) & return
end repeat
scr = scr &" end case" & return
scr = scr &"end" & return
f = new(#script)
f.scriptText = scr
f.name = "Symbol Lookup"
end
This will give you the symbol table as a lingo script. This will differ
from installation to installation because different people have
different sets of Xtras installed. Symbols like 'dumpAllSymbols' and
'scr' will also be present, and should not be taken to be part of the
default set.
There are a lot of goodies in there, including a bunch of undocumented
symbols with intriguing names like 'granularity'. I haven't made a
concerted effort to see how they might work (and some of them probably
dont' work at all yet), but they represent a fascinating window on the
past and future of Director.
'the commandLine' is one of the few that I was able to get a result
from. (The empty string). Has anyone tried it with a command line launch
on Windows yet? I'm running on Mac, so I can't test it here.
--
_____________
Brennan Young
Artist, Composer and Multimedia programmer
mailto:bre...@young.net
Knowledge is like a circle. Ignorance is the area outside it. With
learning, the circle grows, and the boundary between knowledge and
ignorance increases.
The more you know, the more you know you don't know.
c:\> myProjector.exe foo
on startMovie
alert (the commandLine)
end
To send command line parameters from Lingo while opening an external app, just
include them in the file name:
open "thisFile.txt /whatever" with "someProgram.exe"
--
Mark A. Boyd
Keep-On-Learnin' :)
"Alex Smith" <an...@mindspring.com> wrote in message
news:8ssda0$c6s$1...@misc.macromedia.com...
Worth a try though.
Used the following code:
on StartMovie
vCommand = the commandLine
alert(vCommand)
end
Then made a call from command prompt, passing any parameters I wanted. The
string returned them all.
You probably will have to split them (if you are receiving more than one
param), but that is just fine.
Thanks everybody!
"Brennan Young" <bre...@young.net> wrote in message
news:39F22833...@young.net...