Controlling the “Define Script” window in Filemaker!
Hello to all…
I am trying to change the root of all my “Perform Script” steps in all of my 10,000 scripts in a 60 database solution made in FileMaker. I have developed the next AppleScript to help me out with this problem:
tell application "FileMaker Pro Advanced"
activate
end tell
delay 1
tell application "System Events"
tell process "FileMaker Pro"
keystroke "S" using {command down, shift down}
delay 1
if name of window 1 does not start with "Define Scripts" then
beep
display dialog "Error"
else
keystroke (ASCII character 30) --> up arrow
keystroke return
delay 1
if name of window 1 does not start with "Edit Script" then
beep
display dialog "Error"
else
keystroke tab
keystroke tab
keystroke "Perform Script"
delay 1
keystroke space
delay 1
if name of window 1 does not start with "\"Specify Script\" Options" then
keystroke "." using command down
keystroke return
else
tell window 1
tell pop up button 1
click
-- under contruction!
end tell
end tell
end if
end if
end if
end tell
end tell
Basically the script opens the “Define Script” window, goes to the fist script, looks for the first “perform Script” step in it, it activates it (keystroke Space) and tries to change the First menu. The idea from here would be to change the value of this menu and then select a new script and close the window. Unfortunately the “click” step is not working. I have been incapable of controlling the “popup button” of this window. I have tried in Filemaker 7 to Filemaker 10 and in Mac OX 10.5.6 and 10.4.11. AppleScript version 2.2.1 (100.1), 2.0.1. -but nothing works. ¿ any idea?
Hope someone can help!
Thank you for your time!
Brian