StuffScrap
                                ==========

Utility to stuff the contents of the Scrap Buffer into a keyboard queue.

Copy text from QD or other Scrap-aware programs into "any" keyboard queue.
Copy text from Windows into "any" QL keyboard queue.


Introduction:
-------------
Ive had this utility kicking around for years now and just assumed "everyone"
else had something similar. To my horror, I discovered that a number of
people were unaware that they could very easily copy stuff from Windows into
QPC2. (NO NEED TO RE-TYPE CODE SNIPPETS ETC FROM QL FORUM, ETC, INTO SBASIC,
GUYS!!) So I decided it was about time to make my routine available.

The problem was that it uses a bespoke command (STUFF) that is part of a
toolkit. No point in including a large toolkit to this little program, so
it took some time before I finally got round to extracting it and packaging
the whole thing, including this readme, for general consuption.


Requirements:
-------------
QPC2 and SMSQmulator only
Scrap Thing, part of (the now free!) Qmenu suit from JMS


Limitations:
------------
Only works with text items for now.
Text must be no more than about 4k
Not tested under anything else than Windows, so may not work with
emulators running under Linux, OSX, etc.


Usage:
------
This utility is designed to be attached to a Hotkey. For example, in your
primary or secondary boot script, add something like the following line:

        111 ERT HOT_RES1('v', '<util>StuffScrap_obj', 'Stuff')

where <util> is the path to wherever StuffScrap_obj resides.

(In case you didnt know, the following line (or similar) should also be
found somewhere in your boot:

        200 SELect ON MACHINE: = 20: EMU_SYNCSCRAP: = 30: QPC_SYNCSCRAP

)

To test, assuming you unzipped StuffScrap05_zip to ram1_, type the following
line directly into SBASIC:

        ERT HOT_REMV("v"): ERT HOT_RES1('v', 'ram1_StuffScrap_obj', 'Stuff')

Now switch over to Windows, highlight some text and copy it to the Windows
clipboard with CTRL + c. Switch back to QPC2/SMSQmulator, put the cursor
somewhere in your favourite text editor and press ALT + v. The text should
appear there, as if typed in by you (only faster!)

If you use QD, try marking a block (F7 at start and F8 to end) copy the
block to Scrap (F4, o). Now swith to SBASIC or somewhere else in QD and
press ALT + v.

If the above didnt work, you could try entering line 200, above (without
the line number), directly into SBASIC.


Finally:
--------
The source code is included for you to peruse, use, and abuse as you
please. Since I also include a toolkit of mine, you may as well be told
how it works, although I choose not to include the sources for it at this
time. It is free for your personal use, but it remains © pjwitte
1995..2018.

STUFF stuffs a number of strings, or character codes, into the keyboard
queue of the top job.

Usage: STUFF  -timeout% | string$ | char_code% [,..]*

    where

      timeout% is a negative number [-32767..-1] and gives the number
               of frames to suspend
               (during this period a queue change is possible)

      string$ is a standard QDOS string

      char_code% is a number [0..255] representing an ascii code

      "Any number" of parameters may be given, and types may be freely
               mixed


Feedback good, bad and indifferent is recommended if youd like to increase
the chance that any more of this kind of thing will be forthcoming in the
future.. However, I do not offer direct support!

If you have a ("QL" - related) problem, including a problem with this
utility, please post on the QL Forum (www.qlforum.co.uk) where, in due
course, some pundit will attend to the matter.


V0.05, March 17th 2018

pjwitte at google d0t com