Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Clipboard Automation

 [1/7] from: rebolforces::gmail::com at: 13-Dec-2004 15:10


For clipboard automation, I need to monitor the Windoze clipboard / keyboard activity such that after a user types ctlr+v, I put the next item (from a block) onto the clipboard. Problem is, Rebol won't be the target for the pasting activity, so how can I detect the key event from rebol? (I will be using rebol/command) Cheers, Allen K

 [2/7] from: petr:krenzelok:trz:cz at: 13-Dec-2004 11:49


Allen Kamp wrote:
>For clipboard automation, > >I need to monitor the Windoze clipboard / keyboard activity such that >after a user types ctlr+v, I put the next item (from a block) onto the >clipboard. > >Problem is, Rebol won't be the target for the pasting activity, so how >can I detect the key event from rebol? (I will be using rebol/command) >
Hi Allen, well, maybe some Win32 API functions would help, but is it generally a good idea to mess with clipboard that way? If I unserstand it correctly, you want Rebol to become some kind of hidden app, which will catch OS keyboard events? The hook would have to have pretty high priority, it would have to happen even before keayboard event reaches target app/window. The problem is - what is user swithces to e.g. Photoshop and wants to use clipbard in a regular way? Will you influence it from Rebol? How will you distinguish? From what I have done - we have one SAP transaction, where users do use clipboards. They first hilite the grid, put data into clipboard. The problem is, that they need to scroll in grid, because there is many rows, so they repeat operation three or more times. It was annoying for them to constantly switch here or there, so I did small app in rebol. They put data in clipboard, press button "add-2-clipboard", rebol clears lipboard etc. Once they are finished, I do some modification to data etc. and prepare it for its insertion into the target document ... -pekr-

 [3/7] from: volker:nitsch:gmai:l at: 13-Dec-2004 12:15


Can you use an extra keystroke? The user would press a key for "next row", then ctrl-v? Then you could write a %clip-next.row.r and register it with a launch-hotkey On Mon, 13 Dec 2004 15:10:01 +1000, Allen Kamp <[rebolforces--gmail--com]> wrote:

 [4/7] from: greggirwin:mindspring at: 13-Dec-2004 4:19


Hi Allen, AK> I need to monitor the Windoze clipboard / keyboard activity such that AK> after a user types ctlr+v, I put the next item (from a block) onto the AK> clipboard. AK> Problem is, Rebol won't be the target for the pasting activity, so how AK> can I detect the key event from rebol? (I will be using rebol/command) You'll need to use a keyboard hook, or some other approach to trap keystrokes globally, or get even trickier and monitor API calls. Not stuff you probably want to do from REBOL (and some things you won't be able to do at all from REBOL). If you just wanted to watch for things going *into* the clipboard, that might not be so bad. -- Gregg

 [5/7] from: rebolforces::gmail at: 14-Dec-2004 7:48


I understand the concern Pekr, while the app is running it is ALL the end-user will be doing, however as we are dealing with real people, the auto-clip will only respond if the target app is the focussed window. (check via api for a specific title string) -- Allen

 [6/7] from: rebolforces:gma:il at: 14-Dec-2004 7:53


On Mon, 13 Dec 2004 12:15:34 +0100, Volker Nitsch <[volker--nitsch--gmail--com]> wrote:
> Can you use an extra keystroke? The user would press a key for "next > row", then ctrl-v? Then you could write a %clip-next.row.r and > register it with a launch-hotkey >
Great Idea! Not sure how to automate the setup of a launch-hotkey for the end user (apart from RTFM ;-)). But it is another approach I can try and looks more workable than doing keyboard hooks. --Allen

 [7/7] from: antonr:lexicon at: 15-Dec-2004 0:26


Check out WinKey. I have used it successfully and it is relatively easy to install via a rebol installer. Anton.