Re: Returning a Character
Re: Returning a Character
- Subject: Re: Returning a Character
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 07 Sep 2001 09:57:37 -0400
- Organization: [very little]
>
Date: Thu, 06 Sep 2001 20:10:52 -0700
>
From: Sean Malone <email@hidden>
>
Subject: Returning a Character
>
To: email@hidden
>
>
(This post may be doubled as I originally and mistakenly sent it from an
>
account other than the one from where I receive the digest, so it might be
>
refused.)
>
>
I was trying to think of what to call this, though "returning a character"
>
may not be specific enough.
>
>
I'm using FaceSpan for this, and I realize this isn't a FaceSpan list, but I
>
wanted to give you the context for what I'm doing, in order to get to the
>
necessary script to achieve it.
>
>
I've made my own music font, which allows you to write music-analytical
>
symbols in text. In FaceSpan I'm making a kind of equation editor for the
>
font, so that you can easily construct strings without having to know all of
>
the keystrokes for the font. These string are then copied to the clipboard
>
and pasted into whatever text-app you're working with.
>
>
The interface is set up with all of the characters laid out, and when you
>
click on a particular symbol, that symbol appears in the textbox. Now, what
>
I'm not sure about is, the script I have to accommodate this command places
>
the symbol that's clicked in the textbox. But I want to be able to have one
>
after another as if you're typing. The way the script is now, I'm "setting
>
the contents of textbox 1" with the object that you click, but this only
>
permits one thing at a time.
>
>
Could someone tell me how the script needs to change so that the contents of
>
textbox 1 can be filled with as many or few "objects" that the user clicks
>
on?
>
>
=================
>
For example:
>
>
1. on click theObj at theClickLoc upon thePart
>
--handles when the user selects a character
>
2. copy character to textbox "txtName1"
>
--puts it in the textbox
>
3. end click
>
=================
>
>
Each subsequent character that I click should follow the previous character,
>
as if you're typing.
>
>
Any help would be appreciated, I hope I've been clear enough.
>
Thanks,
>
Sean
I don't know FaceSpan at all, but the usual practice in AppleScript
would be to concatenate the new character with the existing contents of
the container. It might be something like:
set textbox "txtName1" to (textbox "txtName1" & character)
or
set textbox "txtName1" to ((contents of textbox "txtName1") & character)
or
copy (textbox "txtName1" & character) to textbox "txtName1"
or
copy ((contents of textbox "txtName1") & character) to textbox "txtName1"
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[9/7/01 9:56:53 AM]