Dennis,
Hello again. :-)
> First question: is this a GUI application (Tkinter, wxPython,
> other), or a console application?
Both. By default it would run silently on the background and exit when
done. But when the SHIFT key is pressed I would like to display a (Tkinter)
dialog (showing options to how to proceede)
> Potential difficulties:
[snip]
I'm aware of those, but have no idea how to proceed. Hence my post.
The easiest solution would be a simple "is the SHIFT key down ?" check,
which would work regardless of how the script is started (thru a shortcut,
by doubleclicking the script itself, thru the console or otherwise) or which
mode it runs in (very doable under Windows, but Linux doesn't seem to like
and thus not offer it)
Another possibility would be that Linux notices the modifier when the
shortcut is clicked, and adds a switch to the call of the program (a long
shot, but hey).
One possible method would be to start the script with a delay and in that
time check for a (repeated) keydown event. But I dislike having such a
guessed "well, this should be longer than the autorepeat" delay. And it
most likely only works for "real" keys, not modifiers like SHIFT, CTRL and
ALT.
As for those links ? I do not really like having to install a different
version of Python just to be able to check for a key being down. Sorry. (I
saw that, IIRC, PyGames offered something similar).
Regards,
Rudy Wieser
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|