Source language: Translate to:

prevent multiple keyboard entry

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

prevent multiple keyboard entry

Postby raja » Thu Apr 15, 2010 6:25 pm

I noticed on some fast windows 7 pc's that my gotonextpage commands were jumping 2 or 3 pages, but on slower machines only 1 page.
Is there a way to prevent multiple keyboard entry?
I tried "suspend" before the gotonextpage, and that helps a bit, but not enough.
I added a delay "300" milleseconds after the gotonextpage, but that seemed to allow many keyboard entries to be processed in that delay time, even though the "delay" was after the "suspend".
Also it appears that the default action of the "restore" command was not clearing the windows buffer of the multiple entries during the 300 millisecond delay.

suggestions welcomed!
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am

Postby Neosoft Support » Fri Apr 16, 2010 10:48 am

I assume that you're talking about using the Page Up or Page Down keys to move between pages in your pub?

NeoBook interprets keys coming from the keyboard the same way any other Windows application does. If simply tapping the Page Down key once causes multiple key events to be sent to Windows, I would suggest adjusting the keyboard repeat rate in the Windows Control Panel. Static could be another potential cause if the problem appears to be random.

If that doesn't work, then there may be something wrong with your keyboard. Many computer manufacturers include extremely cheap membrane keyboards with their PCs to keep costs down. Try substituting a different keyboard and see if the problem goes away.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Gaev » Fri Apr 16, 2010 12:48 pm

Also, if you are using your mouse to click on Buttons associated with the GoToNextPage command ... a faulty mouse will send multiple clicks for every physical mouse button depress/release operation ... I have encountered it with two different mice ... after a couple of years of clicking, the spring loaded mechanism starts to falter.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby raja » Fri Apr 16, 2010 2:09 pm

Thanks for the replies. I am using the keyboard left and right arrows as alternatives to mouse clicking on some buttons.
The problem was noticed when testing the application at some pc stores, so I can't really adjust every machine out there that might run the app.
The last machine tried was a multicore (?) 64 bit windows 7 machine that was so fast that when I clicked on the pause button of the slide show the second mouse button bounce (?) operated the resume button that replaces the pause button, causing the slide show to restart immediately!

I think the answer is to provide a 200 to 300ms delay so that keyboard or mouse entries are held up for that time and not processed.

Another answer would be to replace the previous/next buttons that operate in a custom window with seperate buttons on each page, with each button using a gotopage command, as it would not matter how many times that action was repeated.
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am

Postby Just4Fun » Sat Apr 17, 2010 10:18 pm

Hi Dick:

I'm very new to this, but I want to try to add my help. I'm just brainstorming. Might not help much, but maybe it will give you another idea.

I wonder if you could include an option in a preferences menu or alert box where the user could control the delay via a slider bar or input box? That way, if the user needed to slow things down or speed them up he/she could.

Another idea: Could a timer be used to somehow clock the system's speed and then automatically adjust the delay to that?

Finally, maybe there is a way to identify the computer's processor and make your delay based on that.

-Rachel
May I never be cured of my curiosity! ;-)
User avatar
Just4Fun
 
Posts: 136
Joined: Sun Dec 14, 2008 10:05 am
Location: Western Washington, USA

Postby raja » Sat Apr 17, 2010 10:54 pm

Thanks for your reply Rachel. I am also new to neobook although I have used toolbook for many years.
Some of the behaviour I mentioned before has not happened again, but I do not know why! I am referring to the fact that previously when I included a delay "300" in the button script it allowed multiple clicks to get through, but now it is working as it should and seems to stop them. So I will stay with that now.
I am now converting the application from fixed 800*600 size to be resizeable, and find I cannot use buttons in windows and will have to use buttons in a container at the bottom of the page..... always something new to learn.
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron