Detect scroll activity (when LC is not frontmost)
Mike Bonner
bonnmike at gmail.com
Sat Dec 24 11:10:38 EST 2016
that shoulda been schtasks.exe
On Sat, Dec 24, 2016 at 9:08 AM, Mike Bonner <bonnmike at gmail.com> wrote:
> Is this a windows only app? If so I have the beginnings of an idea. The
> short version is inserting a scheduled task using schtask.exe that only
> fires after a period of idle. The task could be to simply write the time
> to a file. Perhaps after a couple of minutes of idle. Then you can have
> your app check that file, and do the math to figure out how long the user
> has been active since the last idle write. If this works, it would remove
> the need for checking the keys down, or scrolling or anything of that
> nature.
>
> Not sure yet if it will work, but I'll experiment some.
>
> On Fri, Dec 23, 2016 at 7:42 PM, Terry Vogelaar <tvogelaar at de-mare.nl>
> wrote:
>
>> Thank you, Craig and Mike, for your responses. But the problem with the
>> rawKeyDown message is that the mouse needs to be in the LiveCode window. I
>> can scroll in my web browser all day and LiveCode wouldn’t ever notice. So
>> unfortunately this is not what I’m looking for.
>>
>> Doing a feature request for a rawkeysdown function sounds like a good
>> idea.
>>
>> Maybe there is something to the idea of hooking in to the system timer.
>> Although I wouldn’t know how to do that either.
>>
>>
>> With kind regards,
>> Terry Vogelaar
>>
>> > Op 23 dec. 2016, om 12:00 heeft use-livecode-request at lists.runrev.com
>> het volgende geschreven:
>> >
>> > From: dunbarx <dunbarx at aol.com <mailto:dunbarx at aol.com>>
>> >
>> > Hi.
>> >
>> > The "rawKeyDown" message can detect scrollWheel activity. The results
>> are:
>> >
>> > 65308 for a down scroll
>> > 65309 for an up scroll.
>> >
>> > Craig Newman
>> > ------------------------------
>> >
>> > From: Mike Bonner <bonnmike at gmail.com <mailto:bonnmike at gmail.com>>
>> >
>> > I think the scroll wheel sends arrow keys, but since there isn't a
>> > "rawkeysdown()" function to match the keysdown() function it would
>> require
>> > either an external or the function to be added with livecode builder. At
>> > which point I wonder.. Is there a way to hook in to the system timer?
>> (the
>> > one that decides if the screensaver/sleep mode should activate.)
>> >
>> > No clue how to access such a thing. (Could go with the simple method and
>> > request a rawkeysdown() feature)
>> > ------------------------------
>> >
>> > Actually, nevermind, the scroll wheel on my system doesn't trigger an
>> arrow
>> > key press, but the arrowkeys are indeed picked up by keysdown. My
>> > apologies. :)
>> >
>> > ------------------------------
>> >
>> > From: dunbarx <dunbarx at aol.com <mailto:dunbarx at aol.com>>
>> >
>> > I assume this discussion is still intact.
>> >
>> > The "rawkeyDown" message may be trapped as follows:
>> >
>> > on rawkeydown tkey
>> > if tkey = 65308 then doScrollDownStuff
>> > else doScrollUpStuff
>> > end rawkeydown
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
More information about the use-livecode
mailing list