Is this possible?
ambassador at fourthworld.com
Mon Jan 31 01:04:17 EST 2005
Jim Hurley wrote:
> This seems to be all right to me, but just to be sure.
> Rather than have a handler poll the OS each time it is run, would it be
> possible to modify a handler just once in an openstack handler like the
> on openstack
> put the script of button 1 into tScript
> if the platform is "macOS" then
> replace "--unlock screen" with "unlock screen" in tScript
> end if
> set the script of button 1 to tScript
> end openstack
> This works in the IDE environment, but will it work in a stand alone?
> I know a script can't modify itself, and that a stack can't make
> permanent changes in a stand alone, but can a stand alone modify
> component scripts each time the stack is opened as indicated above?
You can only swap out scripts with 10 lines or fewer at runtime.
Better to use an "if" in the script:
if the platform is "MacOS" then
Fourth World Media Corporation
Developer of WebMerge: Publish any database on any Web site
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the Use-livecode