>> I'm looking to write a little utility to record keypresses as >> macros, >> if necessary assigning them to a hotkey or altkey for later use. >> >> Some processes mean repeated strings of keypresses, so it may be >> handy >> to record these keypresses and replay them later with an alt or hot >> key to avoid typing the same commands repeatedly. >> >> Anyone have any idea how best to go about achieving this? >> > My first thought would be hook in an interrupt handler to read the > 'current key press' word from the system variable. But, my second > thought was how to determine if it has changed especially when it is > the > same keypress as the one before. Well, looking at sv_arbuf is possibly one way of doing this, but does not work with 2 successive identical keypresses (unless the program looks at it for the auto-repeat period and reset it, which is definitely not "clean")
> I'm too far away from my docs to be able to look them up at present, > plus I have the boiler man in to fix the central heating. We had a > new > kitchen put in, a radiator removed and it stopped working. The > original > plumber says it wasn't removing the radiator that did it and doesn't > want to know. Plumbers make big money but have a reputation that they ain't always the easiest of people to deal with (like builders) when things go wrong. Even when it really is their fault. > PS. Check "Slow Gold" source code for hooking in an interrupt > handler. > Also, there was a caps lock indicator program (Quanta?) a few years > back. I think that did a similar thing. OK, thanks for that. -- Dilwyn Jones _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm