October 7, 200916 yr Simple example of controlling a web viewer with applescript. More advanced operations are possible. Bruce WVClicker.fp7.zip Edited October 7, 200916 yr by Guest
October 7, 200916 yr 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.
October 7, 200916 yr Author Updated. Try dropping a PDF on it, then choose script Get PDF Contents. WVClicker.fp7.zip
October 7, 200916 yr 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.
October 7, 200916 yr 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, 200916 yr by Guest
October 9, 200916 yr 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 October 9, 200916 yr by Guest
October 9, 200916 yr Leopard. Safari is 4.03 Both are the current versions prior to Snow Leopard. HTH Lee
October 9, 200916 yr 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
October 12, 200916 yr 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
October 12, 200916 yr 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