a file dropped onto a desktop shortcut

"flicknemo" <[email protected]>
Newsgroups gmane.comp.windows.gui4cli
Message-ID <[email protected]>
Hi Dimitris,



I am writing a script which needs any file dropped onto a desktop
shortcut to start the command line, windowless gui.  The gui should then
get the dropped files' quoted pcpath as word1 of the arguments when
word0 is the path of the gui file.

My script uses a line like this :
xOnload word0 word1

this gives $word0 is guipath
but $word1 contains what looks like "dropped pcpath" but with all the
slashes removed and anything like \t removed also, viz :-
>C:Documents and SettingsANONDesktop emp1.txt<
   which looks like the script is stripping it on run.

Inside the xOnload event, I used a SAY command to print to GCWIN the
contents of $word1, to see that.
Next I surrounded the SAY by "set trans", viz :-
set trans off
  say ">$word1<"
set trans on

That printed >$word1<, later on...

set deeptrans off
  say ">$word1<"
set deeptrans on

That printed >C:Documents and SettingsANONDesktop emp1.txt<

I can not see why.  I hope you can find a solution.  All I want is a
pcpath or g4cpath that I can use in the script.

By experimentation, I found that if I modify the command, in the
properties form, of the shortcut to :

C:\WINDOWS\system32\cmd.exe /c echo > C:\myxx.dat {a randomly named
text}
   will place the dropped, quoted pcpath in this ascii file under WinXP. 
Furthermore :

C:\WINDOWS\system32\cmd.exe /c echo >> C:\myxx.dat
   will append the dropped, quoted pcpath in this ascii file under WinXP.
Maybe this fact will be  useful to someone in future.

   I have tried %1 and "%1" in my shortcut but the script prints these
literally.



Any help would be appreciated, Flicknemo.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.