Netscape Timeout to HomePage (LONG MESSAGE)

Hal hkirk at uno.cc.geneseo.edu
Wed Dec 4 01:27:35 EST 1996


>Has anyone successfully found a feature which will time out a Netscape
>search left on the screen by a patron back to the homepage of the library?
>
>
>
>
>Marjorie Bethune
>Acting Deputy Chief Librarian/System        E-mail:  bethunem at haltonbe.on.ca
>Milton Public Library                       Phone:   (905) 875-1550
>Milton, Ontario                             Fax:     (905) 875-4324


Marjorie,

Someone some time ago asked this same question.  I saved the answers you
will find them below.
I have not double-checked these addresses...so some of them may be out of date.

I hope this helps.

-hal

______________________________________________________________
Scripps Institution of Oceanography Library has a public-access Mac with
Netscape with an Applescript providing inactivity timeout and reset to a
home page.  The script prompts after 15 minutes of inactivity and asks if
the user wants to continue.  If user clicks on continue, then the inactivity
timer is set for a longer period before asking.  If no asks to continue
(meaning it is inactive), the script resets Netscape to the designated home
page.  Contact Preston Holmes, pholmes at ucsd.edu, for further information on
the Applescripting................Peter Brueggeman


>http://siolibrary.ucsd.edu/reset/

>This is a simple script which checks for user inactivity at regular
intervals does the following if the machine is
not in use:

     close any open Finder windows
     hide any running programs (does not quit them, telnet sessions left
open should timeout)
     reset Netscape to a defaut page, closing any extra Netscape windows and
stretching the window to fit
     a 14 inch screen.

If the machine is busy, the script can give the user extra time before the
next check.

This script does not provide any security or tamper resistant measures to
the Mac it is running on.

=============================================================
Peter Brueggeman, Scripps Institution of Oceanography Library
University of Calif San Diego, 9500 Gilman Dr, Dept 0175C
San Diego CA 92093-0175 USA
  pbrueggeman at ucsd.edu;       http://www.ucsd.edu/siolibrary/
  Telephone: 619/534-1230;    Fax: 619/534-5269
_____________________________________________________________________

I am using a Programming language called "Flute" which also doubles as
a macro recorder-- it can handle windows, type in text automatically, etc.
You can get it from these sites:

Host ftp.sunet.se

    Location: /pub/pc/windows/mirror-cica/win3/programr
           FILE -r--r--r--    1272833  May  1 1995  flute.zip
    Location: /pub/pc/windows/mirror-cica/win3/uploads
           FILE -r--r--r--        760  Aug 13 08:55  flute.txt
           FILE -r--r--r--     707906  Aug 13 09:03  flute.zip
    Location: /pub/pc/windows/mirror-cica/win95/programr
           FILE -r--r--r--     707906  Aug 13 08:54  flute.zip

Host micros.hensa.ac.uk

    Location: /mirrors/cica/win3/programr
           FILE -rw-r--r--    1272833  May  1 1995  flute.zip

-----

You'll need pkunzip to dezip the file. Just place it in a new
subdirectory. The macro I wrote is this: (comments translated from
spanish, excuse any errors)

----
main{
  /* This program runs until you place the mouse pointer in the top-left
     corner, hold down SHIFT, and wait a few seconds */

  pause:=5;     /* Time between mouse checks */
  timeout:=120; /* Both in seconds */

  numintervals:=timeout/pause;
  hidewindow({"Program Manager"});
  hidewindow({"Trumpet Winsock"});
  hidewindow({"WinQVT/Net v3.9"});

  wait(pause*1000);

 while ( !(shiftkey & pos={0,0}) ) /* Top-left corner is Magic Zone */
  {     i:=0;
        pos:=mousepos;
        pos_ant:=pos;
        while (pos=pos_ant & pos!={0,0} & i<numintervals)
        {       pos_ant:=pos;
                pos:=mousepos;
                i:=i+1;
                wait(pause*1000);

                /* Always make netscape occupy the whole screen, if the
user quit, */
                /*   run it again. */
                if (! (maxwindow({"Netscape - "}) ) )

execute{"c:\internet\netscape\netscape.exe","http://www-cib/"};

                /* Make the active telnet window (if any) the topmost window) */
                if (findwindow({"telnet"}) )
                {       bringwindowtotopmost({"telnet"});
                        /* don't let the user iconize telnet windows */
                        if (isiconic({"telnet"}) )
                                restorewindow("telnet");
                };
        };
        if (i=numintervals)
        {       /* run Netscape*/
                execute{"c:\internet\netscape\netscape.exe","http://www-cib/"};
                /* tell it to 'go home'*/

typetext{{"Netscape",">afxmdiframe",">afx:302b:0:aca:0"},17,"l"};
                typetext{{"Open Location",">edit"},-17,"http://www-cib/",13};
                        /* The '17' means "press ALT", so 17,l == ALT-l */
                        /* '-17' is "release ALT"; the '13' means "press
return". */
                        /* You can insert these codes by using a menu
option which */
                        /*   records your mouse and keyboard actions */
         };
  };
  showwindow({"Program Manager"});
  showwindow({"Trumpet Winsock"});
  showwindow({"WinQVT/Net v3.9"});

}
----
Copy this text and paste it into the Flute editor window.

While it IS a mouthful, it's not that complex. I had previous
experience with 'C' programming so it wasn't too much of a fuss to come
up with it... read the comments to see what it's doing.

In order to make this script startup automatically, you can make a
program icon that goes in the startup group, which contains the path to
FLUTE.EXE, along with "-h -r macroname.flu", so FLUTE knows to hide the
window and run the macro called "macroname.flu". It's explained in
Flute's help section...

The only downside to this macro is that I have no way to gauge user
activity other than by mouse movements. I can't check for keypresses,
but since I'm not shutting down telnets (anymore), there's not much
problem. Telnet windows are always shoved to the front, so the user
doesn't forget they're there-- I'll let normal timeouts log the user
out.

Hope this helps!

_alex
+-------------------------------------+------------------------------------+
| Ing. Alejandro Garza Gonzalez       | E-MAIL: agarza at campus.mty.itesm.mx |
| ITESM University, Monterrey, Mexico | "Ok bye!"                 // Solo  |
+- http://www-cib.mty.itesm.mx/ ------+-------------------------\X/-Amiga!-+
___________________________________________________________________________

Hal Kirkwood
Information Technology Librarian
S.U.N.Y. at Geneseo
Geneseo, NY 14454
716/245-5524
Fax: 716/245-5003
hkirk at uno.cc.geneseo.edu
http://137.238.9.12/~hal/hal.html

"I find that sometimes it's easy to be myself"
"and sometimes I find that it's better to be somebody else"
                -Dave Matthews Band




More information about the Web4lib mailing list