[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Stopping USB drives from XY4 - Script
- Subject: Re: Stopping USB drives from XY4 - Script
- From: Paul Breeze paul.breeze@xxxxxxxx
- Date: Sun, 1 Jan 2006 13:11:58 GMT
Dear Robert
I call up my Litestep equivalent of the Start Menu with CTRL-ALT-P. I tried to program this into
the script but could not make it work. This was why I did not state explicitly how it was done in
my previous message. I now realise that I had made a mistake with the syntax. Having corrected it,
I can now make the script call up the start menu. However it must next search for the
"Run" menu choice and that has so far defeated me.
Since you pointed out that GoXy can supply a key not present on the keyboard, I have found a much
simpler solution which is to program the shell to recognise Win-R as calling up the Run dialog. I
have now done this and the script that works with the Explorer shell also works with Litestep,
except that it appears to complete with the "Unplug or Eject Hardware" window still on
screen, with the USB pen drive stopped. This may be a timing problem as it appears to return
correctly to XY4 occasionally but I haven't been able to ascertain exactly why yet. I think I
should be able to, given more time.
Now for the conditional logic problem.
The script as it works for me calls up the "Unplug or Eject Hardware" window and selects
"USB mass storage device" correctly. At this point it is necessary (on my machine anyway)
to command an ALT-S (stop). This brings up the "Stop a Hardware Device" window with the
first line of the tree "USB Mass Storage Device/Generic volume f/Ut161 ..." highlighted.
I tried to progamme this ALT-S myself into the script but could not make it work. As a trial, I
then edited out the line searching for "Ut161 ..." and ran the rest. That is what I found
worked. However it is certainly not logically very satisfactory, as you point out. As you know,
the script next commands Enter which has the effect of stopping the the device by killing the whole
tree. (Ie it is doing exactly as you suggest and killing the first device in the list.) If I test
this by installing two USB drives at once it kills the first one listed, and leaves the second. It
would certainly be better to modify the scri!
pt so that after the ALT-S from the "Unplug or Eject Hardware" window called up the
"Stop a Hardware Device" window it then found the correct device (ie Ut161 ..., or perhaps
even "Generic volume - (F:)"). Unfortunately my efforts have failed to achieve this. I
don't think I understand the script syntax fully; as you said, it is very terse.
I hope this might help you visualise what is happening here. If not I can send screen shots, off
list unless you would prefer otherwise.
Happy New Year
Paul
On Sat, 31 Dec 2005 17:14:43 -0500, Robert Holmgren wrote:
Paul, when you say "I call up the Menu in a different way", it would help to
say exactly *which* different way! This is like contributors to Usenet forums
who, at the end of a long thread trying to solve a problem, say something like
"Never mind, I figured it out" or "Your idea didn't work, but I found another
way of doing it" -- and don't say WHAT they found or figured out! So: what
keystrokes, exactly, DO call up the Run command in Litestep? Also, it doesn't
matter whether your "old" IBM keyboard has the keys or not -- you're not using
your keyboard, you're using GoXy, and it can supply *any* key, whether it is
physically present on your present keyboard or not. Haven't got a ZOOM key?
GoXy can supply it.
If the script you devised works for you, great. But the conditional logic that
was present in my version is stripped in yours when you get to the second
"Stop" box. I thought that you were offered three device choices in that
second "Stop" box, and that the second choice (with "Ut161" in it) was the
device to kill. Looks to me like you're stopping the first device (on the
first line to appear) in that box, whatever it is, without checking to see if
it's the one you want... If you have a lot of devices running, as I do, that
won't be so great -- the order in which they appear may not always be the same.
Anyway, I'm having a near-impossible time visualizing what you have there, so
unless you want to provide screenshots of the several boxes... I give up.
-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------