Python + Win32: Cut/Paste w/o GUI
Tim Daneliuk
tundra at tundraware.com
Fri Oct 4 19:20:08 EDT 2002
Steve Holden wrote:
> "Tim Daneliuk" <tundra at tundraware.com> wrote in ...
>
>>Disclaimer: I'm *much* more comfortable with Unix innards than Win32, so
>
> if
>
>>the question I am about to ask is stoopid, please bear with me...
>>
>>
>>I want to be able to do the following but am unclear if/how it can be
>
> done:
>
>>1) Write a non-GUI Python script.
>>
>>2) Create a shortcut in Win32 to that script.
>>
>>3) Copy text from an arbitrary Win32 application.
>>
>>4) Paste the copied text to the aforementioned shortcut/python script and
>> have that pasted text be somehow available (argv[] ???) for use by
>
> that
>
>> script.
>>
>>Can this be done?
>
>
>
> Sadly, I don't believe that it can. Certainly attempts to drag-and-drop text
> from another window change the cursor into a "no-entry" sign over program
> icons, implying that Windows doesn't regard them as legitiamte drop targets.
>
> Neither does the context-menu item on a program shortcut include a "Paste"
> option.
>
Well you definitely *can* paste text to a DOS box, at least under Win2K.
You copy the text as usual, highight the DOS box and right click the mouse -
text pasted!
--
------------------------------------------------------------------------------
Tim Daneliuk
tundra at tundraware.com
More information about the Python-list
mailing list