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

Control Web Viewer with Applescript

Featured Replies

Simple example of controlling a web viewer with applescript. More advanced operations are possible.

Bruce

WVClicker.fp7.zip

Edited by Guest

  • Newbies

Very cool, Bruce. But I kept getting an AppleScript error until I modified the script.

Error encountered:

System Events got an error: Can't get list 2 of UI element 1 of scroll area 1 of "WVClicker" of application process "FileMaker Pro". Invalid index.

Fix for script:

tell application "System Events"

tell application process "FileMaker Pro Advanced"

set linkref to a reference to scroll area 1 of window wName

set linkref to a reference to UI element theLink of UI element 1 of linkref

perform action "AXPress" of linkref

end tell

end tell

Lee.

  • Author

Updated. Try dropping a PDF on it, then choose script Get PDF Contents.

WVClicker.fp7.zip

  • Author

Very cool, Bruce. But I kept getting an AppleScript error until I modified the script.

Error encountered:

System Events got an error: Can't get list 2 of UI element 1 of scroll area 1 of "WVClicker" of application process "FileMaker Pro". Invalid index.

Fix for script:

tell application "System Events"

tell application process "FileMaker Pro Advanced"

set linkref to a reference to scroll area 1 of window wName

set linkref to a reference to UI element theLink of UI element 1 of linkref

perform action "AXPress" of linkref

end tell

end tell

Lee.

No, that definitely does not work when I try it.

However, there may be some issues about version of software you're running compared to me. Please identify what version of FileMaker and OS you're using.

Hi Bruce,

I tested both versions of your file, and

In FMPA 9, the Radio Buttons don't react when clicked on.

In FMPA 10, you get an error when you click on them.

Lee

Edited by Guest

  • Author

Hi Bruce,

I tested both versions of your file, and

In FMPA 9, the Radio Buttons don't react when clicked on.

In FMPA 10, you get an error when you click on them.

Lee

The file requires FM10 for the radio buttons are hooked to script triggers. But you can choose a radio button run the "Choose Link" script which works fine in FM9 and FM10.

All features work for me in Filemaker 9 and 10.

Please advise regarding OS version and Safari version.

You do have assistive devices turned on, right?

You do have no other windows open, right?

Edited by Guest

Leopard.

Safari is 4.03

Both are the current versions prior to Snow Leopard.

HTH

Lee

  • Author

I have set up two different script in attempt to deal with OS version differences.

There might also be some cache or performance issues. You might try just manually clicking inside the web viewer window a few times.

WVClicker.fp7.zip

It now works just as you intended. Nice Work Bruce.

Lee

  • Author

It now works just as you intended. Nice Work Bruce.

Lee

Thanks. See updated version. Drop a PDF on it; or text file; and get contents.

WVClicker.fp7.zip

Drop a PDF on it; or text file; and get contents.

Neat! I like this feature.

Lee

Create an account or sign in to comment

Important Information

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

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.