bruceR Posted October 7, 2009 Posted October 7, 2009 (edited) Simple example of controlling a web viewer with applescript. More advanced operations are possible. Bruce WVClicker.fp7.zip Edited October 7, 2009 by Guest
Newbies Lee Hoong Posted October 7, 2009 Newbies Posted October 7, 2009 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.
bruceR Posted October 7, 2009 Author Posted October 7, 2009 Updated. Try dropping a PDF on it, then choose script Get PDF Contents. WVClicker.fp7.zip
bruceR Posted October 7, 2009 Author Posted October 7, 2009 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.
Lee Smith Posted October 7, 2009 Posted October 7, 2009 (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 October 7, 2009 by Guest
bruceR Posted October 9, 2009 Author Posted October 9, 2009 (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 October 9, 2009 by Guest
Lee Smith Posted October 9, 2009 Posted October 9, 2009 Leopard. Safari is 4.03 Both are the current versions prior to Snow Leopard. HTH Lee
bruceR Posted October 9, 2009 Author Posted October 9, 2009 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
Lee Smith Posted October 9, 2009 Posted October 9, 2009 It now works just as you intended. Nice Work Bruce. Lee
bruceR Posted October 12, 2009 Author Posted October 12, 2009 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
Lee Smith Posted October 12, 2009 Posted October 12, 2009 Drop a PDF on it; or text file; and get contents. Neat! I like this feature. Lee
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now