Explicit Variables again

Peter Haworth pete at lcsql.com
Thu Oct 25 20:04:46 EDT 2012


Ho Jacque,
Just been playing around with this and there seems to be a problem using
command-z to undo - leaves garbage in the script field?
Pete
lcSQL Software <http://www.lcsql.com>



On Fri, Oct 19, 2012 at 5:26 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:

> On 10/19/12 5:41 PM, Peter M. Brigham wrote:
>
>> For those who
>> are interested here is my version (slightly altered from yours,
>> Jacque). They are all control-shift keypresses that work only in the
>> IDE script editor.
>>
>
> Actually, heavily modified. :) Here's mine for comparison. It uses the
> command key instead of control key, doesn't include any commenting
> functions, and still doesn't have your (useful) "type space" addition which
> I've been meaning to add now for a few years.
>
> on commandKeyDown whichKey
>   if ("editor field" is not in the name of the target and "script" is not
> in the name of the target) \
>         or the shiftkey is not down
>   then pass commandKeyDown
>   switch whichKey
>     case quote
>     case "'"
>       put quote & the selection & quote into the selection
>       break
>     case "v" -- paste only plain text
>       put the clipboardData["text"] into the selection
>
>       break
>     case "="
>     case "+"
>       put " -" & "-" & "#"&"#"&"#" into the selection
>
>       break
>     case "9"
>     case "0"
>     case "("
>     case ")"
>       put "(" & the selection & ")" into the selection
>       break
>     case "["
>     case "]"
>     case "{"
>     case "}"
>
>       get the selection
>       put "[" & it & "]" into the selection
>       if it = "" then
>         put the selectedchunk into tSel
>
>         put word 4 of tSel into word 2 of tSel
>         put (word 4 of tSel) - 1 into word 4 of tSel
>         select tSel
>       end if
>       break
>     case " " -- scriptPaint
>       put the mousetext into the selection
>       break
>     default
>       pass commandKeyDown
>   end switch
> end commandKeyDown
>
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the use-livecode mailing list