Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Control Web Viewer with Applescript


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

Recommended Posts

Posted (edited)

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

Bruce

WVClicker.fp7.zip

Edited by Guest
  • Newbies
Posted

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.

Posted

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.

Posted (edited)

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
Posted (edited)

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
Posted

Leopard.

Safari is 4.03

Both are the current versions prior to Snow Leopard.

HTH

Lee

Posted

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

Posted

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

Posted

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

Neat! I like this feature.

Lee

This topic is 5533 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
×
×
  • Create New...

Important Information

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