[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Stopping USB drives from XY4 - Script



Dear Robert

For some reason I cannot get the script below to do anything. However I have tried the first script
you sent as BREEZE.GO, inserting /// before each line and then removing them one at at time. It
fails in the third line: key(WT{1000}L1WT{500}JW{Ut161
USB2FlashStorage})KEY(WT{500}RD)key(IF{TD=Ut161:G2})key(JW{Unplug or Eject Hardware}CDG1L2)

As far as I can see this is because when the 'Unplug or Eject Hardware' window opens it looks for a
line containing Ut161 ... However that is not within the window. Under Windows 2000 on my system
you have to click on a button marked 'Stop' which calls up another window listing all the devices
which are running. This does contain the specific device. I hope that helps.

Paul


On Wed, 21 Dec 2005 12:34:36 -0500, Robert Holmgren wrote:
** Reply to message from Paul Breeze  on Wed, 21
Dec 2005 14:22:00 GMT

Paul:

Do this:  First, get GoXy.Exe v1.4.3 from XyWWWeb (very stable, lots of
improvements, and finally an accurate(!) & informative DOCfile):
http://users.datarealm.com/xywwweb/dwnload.cgi?download=Go.ZIP
I'm gonna keep this version for awhile, it really works well.  I had been
posting new builds at the rate of two/day for the previous week -- don't know
which one you have...

Second, step through the script in little pieces.  Let me see if I can break it
down into smaller modules, for testing purposes, below...  The idea is, keep
removing the initial "///" from one more line, working downward, and see if it
works *to that point*.  Then close Unplug and start over, removing the "///"
from the beginning of one more line (and SAving the change to BREEZE.GO in
XyWrite!).  You can *adjust* the script, as necessary, for your Litestep shell
[never heard of that].  If, for example, LeftWindowkey-r -- expressed in the
script as "key(LW)r" -- doesn't summon the Startkey==>Run dialog under
Litestep, then stuff a keystroke that does work.  I've increased (doubled) the
WaiT times that I use, just to be sure time is allowed for "things" to happen,
and so that you can see the process; you can try halving or thirding the WaiT
times later, after you get it to work -- WaiT is expressed as
"key(WT{milliseconds})".

The behavior of your machine may differ from mine, in that I'm using PCCards
with a notebook whereas you have a desktop(?).  On my notebook, you can't just
disable the device without also disabling the adapter (I'm testing with a
Firewire PCCard).  In other words, after stopping the device, you have to pop
the PCCard, plug (swap) the new device into the PCCard, then reinsert the
PCCard into the notebook.  On a desktop, obviously you don't remove a big
internal plug-in board -- but on a notebook you do that (in effect).

Anyway, this works perfectly for me, and *some similar procedure* WILL work for
you too.  Here's the script.  Command:
 dos/nv/x/z /c GoXy.exe G:\XY4\BREEZE.GO "" c
from the XyWrite CMline to start it:

key(LW)rkey(WT{1000})
///RunDLL32.exe shell32.dll,Control_RunDLL hotplug.dllkey(ETWT{2000})
///key(L1WT{1000}JW{Ut161
USB2FlashStorage})KEY(WT{1000}RD)key(IF{TD=Ut161:G2})key(JW{Unplug or Eject
Hardware}CDG1L2)/// This is one long line!  Can't be shortened because Labels
and Go-to-label statements need to be on same line!
///key(AL)s///Hit 'S'top
///key(WT{2000}ET)/// 'OK' [EnTerkey] on "Stop a Hardware device" dialog
///key(WT{2000}ET)/// 'OK' on "Safe To Remove Hardware" dialog
///key(WT{2000}AL)c/// Alt-c to 'C'lose "Unplug or Eject Hardware" dialog
///key(JW{TO})///JumpWindow{TitleOriginal} i.e. return to "XYWRITE" on
conclusion

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------