Code: Select all
-- Modifying your behavior script
on mouseUp
type (the label of me)
end mouseUp
Code: Select all
on mouseUp
delete char (word 4 of the selectedChunk) of the focusedObject
end mouseUp
Just my 2 cents,
Ken
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
-- Modifying your behavior script
on mouseUp
type (the label of me)
end mouseUp
Code: Select all
on mouseUp
delete char (word 4 of the selectedChunk) of the focusedObject
end mouseUp
Code: Select all
on mouseUp
put fld "f3" into GUFF
put GUFF into fld "f1"
type GUFF into fld "f2"
end mouseUp
Is that so?richmond62 wrote: ↑Sat Nov 13, 2021 8:57 amOddly enouugh, TYPE does not seem to be in the dictionary...
Code: Select all
on mouseUp
put fld "f3" into GUFF
put GUFF into fld "f1"
type GUFF into fld "f2"
end mouseUp
Try this.The type command does not automatically place an insertion point in a
field, so if you want to simulate typing into a field, you must first
use the select command to place the insertion point:
select after field "Data"
type "Hello"
Code: Select all
on mouseUp
put fld "f3" into GUFF
put GUFF into fld "f1"
## We cannot TYPE diretly INTO, thus:
focus on fld "f2"
## or to specify an insertion point if there is already text in the target field:
## select AFTER fld "f2"
## NOW:
type GUFF
end mouseUp
Code: Select all
on mouseUp
put fld "f3" into GUFF
put GUFF into fld "f1"
focus on fld "f2"
type GUFF into fld "f2"
end mouseUp
The put command involves no messages, the text goes directly into the field. The type command simulates user interaction and sends all the normal messages - keyDown, keyUp, etc. So if you have handlers that monitor user typing, they will trigger normally when the type command executes.
Set the typingRate to 0. The default is 100ms.The "advantage" of TYPE s that the text takes up to 10 times as long to end up in the target field