Please suggest an easy way to deactivate a fields scripts

Jim Ault jimaultwins at yahoo.com
Wed Mar 18 15:51:07 EDT 2009


Why not do something like this

if the optionKey is down then
get the deactivateMode of me
if it is true then set the deactivateMode of me to false
else set the deactivateMode of me to true
save this stack
end if
end if

if the deactivateMode of me of me is false then
    execute these lines
    line 15 to -2 of the script
end if

--thus the optionKey toggles the deactivate mode of the field
--and saves this with the stack
--it is reversible

Jim Ault
Las Vegas

On Mar 18, 2009, at 8:04 AM, DunbarX at aol.com wrote:

>
> In a message dated 3/18/09 10:20:04 AM, shoreagent at gmail.com writes:
>
>
>> Craig
>>
>> Do you really do that in any of your scripts?
>>
>
> No. And you cannot. An error message states "you cannot set script  
> while it
> is executing". I tried:
>
> on mouseEnter
>    get the script of me
>    put line 1 to 14 of it & return into keepThis
>     put line 15 to the number of lines of it of it into commentThis
>    if the optionKey is down then
>       repeat with y = 1 to the number of lines of commentThis
>          put "--" before line y of commentThis
>       end repeat
>       else
>       replace "--" with empty in commentThis
>    end if
>    set the script of me to keepThis & commentThis
>    save stack "yourStack"
> end mouseEnter
>
>
>
>
> **************
> Great Deals on Dell 15" Laptops - Starting at $479
> (http://pr.atwola.com/promoclk/100126575x1220433363x1201394532/aol?redir=http:%2F%2Fad.doub
> leclick.net%2Fclk%3B212935224%3B34245239%3Bb)
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list