Jump to content

Set Field[contents of clipboard]?!


This topic is 6548 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

[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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

-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"

Link to comment
Share on other sites

This topic is 6548 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.