transferring all elements of a fld into another fld

Need help with a script? This is the place to discuss how to get your code running!

transferring all elements of a fld into another fld

Postby komouton » Wed Jun 14, 2017 1:37 pm

Is there a method to transfer/duplicate all elements of a fld into another fld?

"All elements" include text string, text formatting, and fld objects.

Some elements can be transferred by copy/paste, but can't by a command "set the rtfText of fld ..."

Examples:
underscore (double, dash, wave or others)


Some elements can be transferred by a command "set the rtfText of fld ...", but can't by copy/paste.

Examples:
fld objects


There is no method to transfer/duplicate all fld's elements into another fld with one action, isn't there?
komouton
 
Posts: 101
Joined: Wed Oct 21, 2009 1:30 pm

Re: transferring all elements of a fld into another fld

Postby Scott » Thu Jun 15, 2017 8:55 am

This seems to work here:

Code: Select all
lock screen
select text of cd fld 1
copy
select text of cd fld 2
paste
unlock screen


Are you sure the allowObjects of the destination field is true?
User avatar
Scott
Site Admin
 
Posts: 1203
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: transferring all elements of a fld into another fld

Postby komouton » Thu Jun 15, 2017 9:41 pm

In my examination, field's objects (hyperlink, picture, picture with hyperlink) can't be transferred by normal copy/paste. They are pasted as 1 byte character (ASCII 1).
komouton
 
Posts: 101
Joined: Wed Oct 21, 2009 1:30 pm

Re: transferring all elements of a fld into another fld

Postby Scott » Fri Jun 16, 2017 7:48 am

After a second look it appears the hyperlink object is what is preventing this from working as expected. We'll have a look.
User avatar
Scott
Site Admin
 
Posts: 1203
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada


Return to Scripting in SuperTalk

Who is online

Users browsing this forum: No registered users and 1 guest

cron