LockInterface System Command

LOCKINTERFACE System Commands

Locks the PageStream interface to prevent the user from doing anything.

lockinterface

toggle/k The interface lock status.

Options: TRUE | FALSE.

Examples:

lockinterface true

 

LockInterface  Command Definition  url:PGScmd/lockinterface
  created:2006-03-30 15:05:43   last updated:2006-03-30 15:39:29
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For LockInterface
Dan Kilroy wrote...2006-05-04 16:39:41

Script command submitted from PageStream internal documentation. Needs to be checked and merged with the command documentation above.

Gets the {...} .

LockInterface (<TRUE|FALSE>)

Parameters:


Results:


Notes:


See Also:


Examples:
Python:


ARexx:

Applescript:

Tim Doty wrote...2006-07-12 05:26:40

The point of this command is to allow a script to run without the user inadvertently changing something about the document. For example, the SendTextToEditor script uses this. Otherwise the user could potentially, even accidentally, delete the originating text frame/frameless text object while the article was exported to the text editor.

NoteIf the script ends before calling LockInterface('false') the interface will remain locked and the only recourse is to force PageStream to exit. When using this command it is important to make sure that the interface will always be unlocked, even if the script crashes.

Python:

LockInterface("true")
Refresh("wait")
try:
# some code
finally:
Refresh("continue")
LockInterface("false")

This command is redundant for Python scripts because the interface is always locked while a Python script is running. However, it can still make sense to include this command in a Python script if, were the interface to be unlocked, it would be susceptible to user interference. This is a way of future-proofing the script in the event that some future version did not lock the interface when running Python scripts.

NoteThe locking of the interface that occurs automatically with Python scripts is safe. There is no danger of the user being locked out as there is with the LockInterface command.

User Contributed Comments For LockInterface