Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 6:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: timing out while using web browser object
PostPosted: January 11th, 2005, 3:48 am 
Offline

Joined: December 29th, 2004, 12:00 pm
Posts: 230
Location: Auckland NZ
Opus: v 7.04
OS: xp & win7
I'm sure I've posted this before and come up against a wall, but in case someone has a good idea...
If my pub has a return to menu if no activity timeout property applied then how can I stop it timing out while my user is browsing a web page in a browser window? Mouse activity is no longer recorded in the publication....


Top
 Profile  
 
 Post subject:
PostPosted: January 13th, 2005, 2:47 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

As you are probably aware, DocView and Browser objects use a completely different window than that of the main Opus publication and Opus cannot detect mouse movement within these objects. It is therefore possible that the 'Reset' feature will assume that there has been no activity in the publication and may take the user back to the menu.

One workaround would be to disable the publication-wide 'Reset' property and creating your own reset action which you could apply only to pages which do not contain Browser or DocView objects.

To do this, I would recommend adding a Script Object to the pages where you wish to keep track of inactivity. In this Script Object, use the following code:

Code:
time = 0

while (true) {
   origpos = GetMousePosition()
   origx = origpos.x
   origy = origpos.y
   wait(0.1)
   newpos = GetMousePosition()
   newx = newpos.x
   newy = newpos.y
   if (origx == newx && origy == newy) {
      time = time + 0.1
   } else {
      time = 0
   }
if (time > 10) {
   GotoPage("Menu")
   }
}


This code checks the current position of the cursor and stores the current X position to a variable named 'origx' and the current Y position to a variable named 'origy'.

A tenth of a second later, the mouse position is checked again, but this time the X and Y co-ordinates are stored to variables named 'newx' and 'newy'.

The script then checks to see if the original X and Y co-ordinates are the same as the new ones. If so, the mouse has not moved in this 0.1 second period and a variable named time is increased by 0.1.

If the original X and Y co-ordinates do not match the new co-ordinates, the mouse has obviously moved in this period and the time variable is reset back to zero.

Finally, an If statement checks to see if the time variable has reached 10 (i.e; the mouse has been inactive for 10 seconds). If so, the user is taken page to a page called "Menu".

I have attached the completed version of this example for your perusal. You would simply need to copy this script object onto any page which should monitor inactivity, but do not copy this onto pages which contain DocView or Browser objects.

I hope this helps. Please do not hesitate to contact me if you have any further queries.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
 Post subject: thanks
PostPosted: January 13th, 2005, 9:41 pm 
Offline

Joined: December 29th, 2004, 12:00 pm
Posts: 230
Location: Auckland NZ
Opus: v 7.04
OS: xp & win7
thanks for that - I have been doing something similar using actions in some publications,
unfortunately this particular pub is nothing more than a menu to a variety of web forms on a council intranet for kiosk use, so every page except the menu has a browser object. :(


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject:
PostPosted: January 14th, 2005, 6:59 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Robin says

but do not copy this onto pages which contain DocView or Browser objects.

This works fine for me with browser objects even when the browser
has focus.

Chris

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group