PDA

View Full Version : Problem with disk eject action



frdfsnlght
September 12th, 2003, 10:07 PM
I want to use the disk eject action. The "file" setting is supposed to contain the drive letter to eject. Apparently, you can not use a variable in that field, like "[DriveLetter]", but must use a literal string like "D".

Is this intentional, or just an oversight in the code? Or am I doing something wrong?

Or is there a better way to eject a drive based on a drive letter stored in a variable? I'd like to do this using Girder alone rather than an extra proggy as a helper, unless there's a command built into Windows?

I've searched the forums and haven't found anything better. Can anyone help?

-Tab

Bitmonster
September 13th, 2003, 03:48 AM
Eventhough you are right, that it would be nice if every field could be used with a variable, I would suggest a simple workaround:

Make one group with an eject-command for every possible drive and assign a girder-event with a common naming scheme to them. For example "eject_D", "eject_E" and so on. Now you can simply use TriggerEvent to get the right drive:

TriggerEvent("eject_" .. DriveLetter)

or to make it more failproof:

TriggerEvent("eject_" .. strupper(DriveLetter))