Page 1 of 1 1
Topic Options
#169176 - 2006-10-11 11:58 AM Break On/Off
swoop1970 Offline
Lurker

Registered: 2005-07-26
Posts: 4
I'm using a login script with KixForms and Kix32.
The Kixform for drawing the form with a progress bar and text steps an kix32 for scripting.

When the form is created I set this option to hide de minimize and close button: $Form.ControlBox = "False"

I also have set the “Break On” option in the script, but when I close the script on my Windows XP Professional desktop the script stops and the logoff (default for KIX) is not started. I can continu with my work. What is wrong here?

Top
#169177 - 2006-10-11 03:50 PM Re: Break On/Off
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
You should not set the Break On if you whish that the user is logged of when he BREAKS the KiX script. Default for Break is Off.
from the kix2010.doc
Quote:


As an additional protection, on computers running Windows NT Workstation only, when BREAK is OFF (the default) KiXtart also installs a special event handler for the current console. The effect of this handler is that whenever a user forcibly terminates KiXtart, the user is automatically logged off. This also means that you must be careful when testing scripts.




But if I understand well, you will want to use the Logoff() function.


Edited by Witto (2006-10-11 03:53 PM)

Top
#169178 - 2006-10-11 04:35 PM Re: Break On/Off
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
swoop,

for a better understanding, BREAK ON will set the mentioned event handler to off/unconscious/unloaded (whatever), so the user will be enabled to break the script without being logged off, thus break on.

setting nothing or BREAK OFF explicitly will enable this event handler, thus the user will be logged off forcibly if the KiX-script is terminated (NOT the FORM!).

Having said that, you might consider introducing another mechanism inside the kixforms part of your script as the user will be able to interrupt your form with ALT-F4 in any case without being logged off.

The common approach is to set a flag variable when all tasks are done and place a conditional logoff(1) after the event loop
_________________________



Top
#169179 - 2006-10-11 07:04 PM Re: Break On/Off
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
also, using wkix32.exe, you can't ever end the script as the close X is always grayed out.
Top
#169180 - 2006-10-11 07:48 PM Re: Break On/Off
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Lately I've seen a lot of

Code:

If NOT @LOGONMODE
Break on
EndIf



at the top of some scripts. If the script runs at logon break will be off (default) and users will be logged out when the click on the top right X. If you are testing the script when you are already logged on and need to see if changes to the script will work break is on so if the script loops or something you can easily close it and you will not be logged out.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 381 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org