Saubs Posted February 18, 2004 Posted February 18, 2004 Hello, all--- Am trying to write a script (in Scriptmaker or AppleScript) that will set a global text field with the contents of the clipboard. Ideas? Thanks much
Saubs Posted February 18, 2004 Author Posted February 18, 2004 Actually I don't want to use 'paste' because the global field resides on a different layout. And I don't want to invisibly switch to that layout, do the paste, then come back because that will cause an unwanted refresh to happen on my original layout. That's why I want to do a Set Field. Sorry, I should've been more specific.
kenneth2k1 Posted February 18, 2004 Posted February 18, 2004 Then just make the global invisible on that layout and don't allow entry. You might need a go to next field step or something like that.
-Queue- Posted February 18, 2004 Posted February 18, 2004 Put the global field on your current layout, disallow entry to it, remove the border, change the font to the same color as the background, and set it to be 1 pixel by 1 pixel, or something similar. Then Paste [ ] into the current layout. You'll never get the clipboard contents via a Set Field.
Lee Smith Posted February 18, 2004 Posted February 18, 2004 [color:"blue"] Actually I don't want to use 'paste' because the global field resides on a different layout. And I don't want to invisibly switch to that layout, do the paste, then come back because that will cause an unwanted refresh to happen on my original layout. This is not an accurate statement. You can use the Freeze Window Script Step to help eliminate this problem. [color:"blue"] That's why I want to do a Set Field. Sorry, I should've been more specific. The Set Field approach would eliminate the need for the field on the current layout, but in order to set the field with the clipboard, you are still going to need to paste the contents to a field. You might consider a field on your current layout for this purpose. You could hide it by making if 1px x 1px, make it the same color (type and field) as the background, or hide it behind another field. Be sure and remove it from the tab order. Lee Wow, why I was away composing this, everyone else answered the question too.
kenneth2k1 Posted February 18, 2004 Posted February 18, 2004 Lee Smith said: Wow, why I was away composing this, everyone else answered the question too. Losing your touch there, pooh-bah
Saubs Posted February 18, 2004 Author Posted February 18, 2004 Lee, The original version of my script did use the 'Freeze Window' step, but oddly enough the layout still kept refreshing when the script finished executing. Couldn't figure out why. Anyway, I've gone ahead and used your suggestion of putting the 'invisible' global field onto the layout and pasting into it. Works great--Thanks very much!
-Queue- Posted February 18, 2004 Posted February 18, 2004 The last step of a script containing a Freeze Window step is always a refresh. From FM Help re: Freeze Window: Note No Refresh Window step is needed if it would be the last step in a script. FileMaker Pro automatically turns off Freeze Window and refreshes the display when a script ends.
kenneth2k1 Posted February 19, 2004 Posted February 19, 2004 -Queue- said: The last step of a script containing a Freeze Window step is always a refresh. From FM Help re: Freeze Window: Note No Refresh Window step is needed if it would be the last step in a script. FileMaker Pro automatically turns off Freeze Window and refreshes the display when a script ends. Yep. The freeze window will stop the layout you go to from showing (unless it's part of a sub-script, which is stoopid), but it will alway refresh when the script is done, hence the little "flash"
Recommended Posts
This topic is 7587 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