Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Set Field[contents of clipboard]?!

Featured Replies

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

look at the Script step Paste

Lee

  • Author

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.

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.

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.

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

Lee Smith said:

Wow, why I was away composing this, everyone else answered the question too.

Losing your touch there, pooh-bah grin.gif

  • Author

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!

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.

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.