SteveGriff Posted September 11, 2002 Posted September 11, 2002 Hi gang, I've got a field called "stuff" which contains text that has been formatted (underlined, bold etc.). What I want is to set the field contents of another field, with formatting intact. Any idea on how to do this? I can't seem to find a way to do it, Cheers Steve Griff
The Bridge Posted September 11, 2002 Posted September 11, 2002 The only thing I can think of is to use a 2-step script: Copy (from Stuff) and Paste (into destination field). This seems to work well in tests, but you may want to add script steps and fields that will store/restore the clipboard in the process.
CobaltSky Posted September 11, 2002 Posted September 11, 2002 I'm afraid I think you're right that copy and paste is the only way to move data around with its formatting intact. Which is unfortunate - not only because of the loss of clipboard contents, but also because of the need to ensure that the steps are performed on layouts where source and target fields are present and accessible. Maintaining the contents of the clipboard is also not a straightforward task unless you can be certain that the contents will be of a particular data type (and then script the choice of an appropriate global field to use as a temporary 'dump' location). Eg. if you try to place a container into a text field etc you won't get anything useful back. The only really elegant solution to this that I know of is the Troi ClipSave plug-in, which is a two-trick pony - it saves the clipboard and restores it.
The Bridge Posted September 11, 2002 Posted September 11, 2002 Not to take anything away from Troi -- which makes a fine line of very useful plugins -- but Jazz has a freeware cross-platform plugin available which will also save/restore the clipboard. There is another thread somewhere on FMForums which details a good way to save/restore the clipboard, but the basic premise is something like: Save Clipboard Script Go to Layout ("Clipboard Layout") Paste (Global_Clipboard_Container) If (isEmpty(Global_Clipboard_Container)) Paste (Global_Clipboard_Text) End If and Restore Clipboard Script Go to Layout ("Clipboard Layout") If (not IsEmpty(Global_Clipboard_Text)) Cut (Global_Clipboard_Text) Else Cut (Global_Clipboard_Container) End If ... where Clipboard Layout is a layout containing two global fields: Global_Clipboard_Container (global container) and Global_Clipboard_Text (global text).
Recommended Posts
This topic is 8447 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now