--- In [email protected], "swzoh" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], Petra8 <Petra8@> wrote:
> >
> > Hello!
> > Does anyone know how to assign shortcuts
> > to eject 2 cdroms?
> >
> > Thanks for any ideas
> > Leon
>
> I suppose you mean the second cd-rom. See this:
> http://groups.yahoo.com/group/power-pro/message/25618
>
> What I'm actually using after assigning the last two letters y z to my
> cdroms:
>
> ---------------- cdrom.powerpro ------------------------------------
> @cdrom
> local cdrom=select(line(file.alldrives,-1-arg(1)),2)
> do("flag reverse",26-arg(1))
> mci("open "++cdrom++" type cdaudio alias cd shareable")
> mci("set cd door "++ifelse(pproflag(26-arg(1)),"open,closed"))
> mci("close cd")
> quit
> --------------------------------------------------------------------
>
> This script toggles, ie open/close, the cdrom's tray:
> .cdrom(0) ; you can omit 0 here
> .cdrom(1)
As the above is not genuine toggling, I took this opportunity to write
a genuine toggling script:
@cdrom
local cdrom=select(line(file.alldrives,-1-arg(1)),2)
local _perfcount_=perfcount
mci("open "++cdrom++" type cdaudio alias cd shareable")
mci("set cd door open")
if(int64.compare(int64.sub(perfcount,_perfcount_),perffreq)<0)
mci("set cd door closed")
mci("close cd")
quit
Sean
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/