[Tutor] drag-and-drop argument passing
alan.gauld@bt.com
alan.gauld@bt.com
Thu, 27 Jun 2002 17:17:36 +0100
------_=_NextPart_001_01C21DF6.265218B0
Content-type: text/plain; charset="iso-8859-1"
> I have a script that takes an arbitrary number of paths to files as a
> command line argument, and manipulates the said files. Now, I would
> like to be able to execute the script and pass the arguments to it by
> drag-and-dropping the target files on the script icon in Windows.
OK, Just do it. It should just work.
Windows passes dragged files in as command line args.
I'm not so sure about multiple files tho' but try a
single file to see if that works first.
Get it to log sys.args and see what Windows passes
to it...
Alan g.
------_=_NextPart_001_01C21DF6.265218B0
Content-type: text/html; charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>> </FONT></SPAN>I have a script that takes an arbitrary number
of paths to files as a <SPAN class=830281916-27062002><FONT
face="Courier New" color=#0000ff size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>> </FONT> </SPAN>command line argument, and manipulates the said
files. Now, I would <SPAN class=830281916-27062002><FONT face="Courier New"
color=#0000ff size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>> </FONT> </SPAN>like to be able to execute the script and pass
the arguments to it by <SPAN class=830281916-27062002><FONT
face="Courier New" color=#0000ff size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>> </FONT> </SPAN>drag-and-dropping the target files on the script
icon in Windows. <SPAN class=830281916-27062002><FONT face="Courier New"
color=#0000ff size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002></SPAN> </DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>OK, Just do it. It should just work.</FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>Windows passes dragged files in as command line args.</FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>I'm not so sure about multiple files tho' but try a </FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>single file to see if that works first.</FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>Get it to log sys.args and see what Windows passes </FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>to it...</FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2>Alan g.</FONT></SPAN></DIV>
<DIV><SPAN class=830281916-27062002><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><FONT face="Courier New" color=#0000ff
size=2></FONT> </DIV></BODY></HTML>
------_=_NextPart_001_01C21DF6.265218B0--