Source language: Translate to:

Idle Event

General questions about NeoBook

Moderator: Neosoft Support

Idle Event

Postby ajhunt » Wed Dec 06, 2017 4:09 pm

Hi All, according to the help file for the Idle Event actions: These actions are executed if no keyboard or mouse activity has been detected during the time interval specified. Enter the time interval (in seconds) that the system must remain idle before the Action is triggered. I have a loop in a script which waits to see what key is pressed (Yes or No) but this stops the Idle Event from ever taking place as the script is always looping (no keyboard or mouse activity takes place). May I ask if anyone has found a solution to this. Many thanks. Is there maybe a plugin which stops the script and waits for an environment variable or something and then do this or do that?
ajhunt
 
Posts: 224
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Re: Idle Event

Postby Neosoft Support » Thu Dec 14, 2017 7:23 pm

You're right the loop prevents the idle event from being triggered. If you want to know what key is pressed, create a Text Entry Field and place it off-screen somewhere. Then set the focus to the Text Entry Field (using the FocusObject) action. Use the Text Entry Field's changed action to detect the key pressed. Then just wait for a key to be pressed or the idle event to trigger.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Idle Event

Postby ajhunt » Fri Dec 15, 2017 2:33 am

Hi Team, sounds a little confusing when reading it but will definately have a go at it - thank you for your help as always.
ajhunt
 
Posts: 224
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron