Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to send parameters to a director projector

56 views
Skip to first unread message

Ivan Imanishi

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
Hello everybody,

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


theLingorian

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
You should look into the Buddy API Xtra which has a great
function for doing exactly that.

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

theLingorian

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
You can find the Buddy API Xtra here:
www.mods.com.au/


Brennan Young

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
Ivan Imanishi wrote:

> 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

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
Those undocumented features... how do you get this information?

:-)

theLingorian

Brennan Young

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
theLingorian wrote:
>
> Those undocumented features... how do you get this information?

Heh heh. With a Ouija board.

No seriously, I snapped 'the commandLine' up by using the 'DumpSymbol'
Xtra available from

http://www.pimz.com/xtras/

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.

Alex Smith

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
I'd like to try it but how do I exactly use it, the
commandline(notepad.exe)? I'm on NT.

Mark A. Boyd

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
the commandLine returns the parameters used when starting the projector.

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...

Alex Smith

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
Yeah just returns empty string if put the command line, if alert(the
commandLine) in on startMovie handler just has alert box saying OK with no
values. WinNT. So it does nothing.

Brennan Young

unread,
Oct 22, 2000, 3:00:00 AM10/22/00
to

Worth a try though.

Ivan Imanishi

unread,
Oct 23, 2000, 3:00:00 AM10/23/00
to
It worked fine with me. I'm using windows 2000 server.

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...

0 new messages