Ask a Question related to Macromedia Director Lingo, Design and Development.
-
BigDaddy webforumsuser@macromedia.com #1
help with 'repeat'- if I need to(?)
Hi,
I am using buddy api to get a list of pc drives: set dl = baDiskList(), then I want to see which of the drives is a cd-rom.
If I look at the dl list and pick one to check via: set dt = baDiskInfo("g","type"), I get a good result.
My trouble is in trying to automate the process- ie, get a line of code to take the dl list items and check them, by which I get a new list. I have tried: irepeat with q = 1 to dl.count, set dt = baDiskInfo(q, "type"), but it only gives me one result. I have tried to fit an append in there, but to no avail.
Help, please.
BigDaddy webforumsuser@macromedia.com Guest
-
repeat
I used to play certain games on Shockwave but now when I want to play them it says that I need a media player or a shockwave player. I click to... -
help me with repeat while
Hi! Shouldn't this work; repeat while J < 4 t = member("w3d").newTexture("B",#fromCastMember,member("B")) end repeat -
background-repeat: repeat-x in HTML? Please help!
I want to have a "centered page" look full screen...I have made them using layers and CSS but if I need it to work in most browsers how do I do the... -
Repeat Header??
Hi, Can I repeat the datagrid header every X rows??? Regards Eval -
repeat while...
I'm having difficulty with a repeat loop in some movie controls. When I press the rewind button and the movieTime reaches 0, it goes back to the... -
Alexander Ross #2
Re: help with 'repeat'- if I need to(?)
how bout:
cdromdirves = []
repeat with i in baDiskList
if baDiskInfo(i,"type") then
cdromdirves.append(i)
end if
end repeat
"BigDaddy" <webforumsuser@macromedia.com> wrote in message
news:bepcf1$od4$1@forums.macromedia.com...then I want to see which of the drives is a cd-rom.> Hi,
> I am using buddy api to get a list of pc drives: set dl = baDiskList(),baDiskInfo("g","type"), I get a good result.> If I look at the dl list and pick one to check via: set dt =take the dl list items and check them, by which I get a new list. I have> My trouble is in trying to automate the process- ie, get a line of code to
tried: irepeat with q = 1 to dl.count, set dt = baDiskInfo(q, "type"), but
it only gives me one result. I have tried to fit an append in there, but to
no avail.> Help, please.
>
>
Alexander Ross Guest
-
tgilmour webforumsuser@macromedia.com #3
Re: help with 'repeat'- if I need to(?)
HI, I don't know anything about Buddy API, but I do know you can perform this operation with the free Xtra, FileXtra3 (go to the 3rd party xtras page)
then use this code:
c=1
fxObj=xtra("FleXtra3").new()
myvolumelist=fxObj.fx_VolumesToList()
repeat with i=1 to myvolumelist.count
if fxObj.fx_VolumeIsCDROM(myvolumelist) then
mycdromlist[c]=myvolumelist
c=c+1
end if
end repeat
This will put all your cdroms in one list.
tgilmour webforumsuser@macromedia.com Guest
-
BigDaddy webforumsuser@macromedia.com #4
Re: help with 'repeat'- if I need to(?)
Thanks for the reply!
I don't know much about fileXtra. I was hoping to get it done via buddy api- I bought it.
I have a hard coded 'solution', but it isn't driven by 'how many' drives are found.
If there's anyone else who could take a shot at my dilemma, please do.
Thanks,
Big Daddy
BigDaddy webforumsuser@macromedia.com Guest
-
johnAq webforumsuser@macromedia.com #5
Re: help with 'repeat'- if I need to(?)
Do you want to return just the first CD drive found, or a list of all cd drives (many computers have an external burner & internal reader)
It looks like you're heading in the right direction with your Buddy code and repeat loop, can you post the complete handler you are using because it seems that you probably just have a simple error in your repeat loop.
This (untested) code should return the first CD-ROM drive
on findCDdrive
dl = baDiskList()
repeat with d in dl
if baDiskInfo(q, "type") = "CD-ROM" then RETURN d
end repeat
end
just put that in a movie script & type in the message window
put findCDdrive()
Also - if you're project is running from the CD drive then you will be able to get the name of the drive from 'the moviePath' property
hth
johnAq
johnAq webforumsuser@macromedia.com Guest



Reply With Quote

