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. You also need the Scrap Thing from Qmenu. The Qmenu suit from JMS is now free. Get the latest version at www.kilgus.net/smsqe/qmenu/ 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. (I can confirm it at least works under Linux with SMSQmulator.) 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 script: 200 SELect ON MACHINE: = 20: EMU_SYNCSCRAP: = 30: QPC_SYNCSCRAP ) To test, assuming you unzipped StuffScrapXX_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. STUFFing BASIC code ------------------- If you copy some code from, say QL Forum that you want to try out in SBASIC, select the desired code in your host browser and copy it to the clipboard (CTRL+c or whatever key combination your host OS uses), then switch to QPC2/SMSQmulator If the code has line numbers then focus on window #0, and, presuming youve attached Stuff_obj to ALT+v, press that key combination. The code should now be in SBASIC and ready to run or save. If, however, the code doesnt have line numbers, then type ED<ENTER> in window #0 first.. In the SBASIC editor (presumably window #2) type the first line number you wish to use, say 100<SPACE> then do the ALT+v. The program should now be in SBASIC and ready to run or save. Finally ------- The STUFF command can be found under Knoware.no / toolkits 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.06, pjw, 2020 Jan 31 V0.06, pjw, 2021 Oct 21, this text updated. No other change. V0.07, pjw, 2024 Feb 06, Added $buff directive Conditions of use and DISCLAIMER as per Knoware.no
Generated by QuickHTM, 2024 Feb 06