October 23, 200916 yr I have the following line in my script: click menu item "QuickTime…" of menu 4 of menu bar item "Insert" of menu bar 1 But this doesn't work. This is the error: error "System Events got an error: Can’t get menu 4 of menu bar item "Insert" of menu bar 1 of process "FileMaker Pro Advanced". Invalid index." number -1719 from menu 4 of menu bar item "Insert" of menu bar 1 of process "FileMaker Pro Advanced" Could someone tell me the what am I'm doing wrong here? Edited October 23, 200916 yr by Guest
October 23, 200916 yr Author A bit farther. I now have the following script: set the destination_file to "/Users/jeffrey/Downloads/jotts/mp3s/somebunchofnumbers.mp3" activate application "FileMaker Pro Advanced" delay 0.2 tell application "System Events" tell process "FileMaker Pro Advanced" click menu item "QuickTime…" of menu 1 of menu bar item "Insert" of menu bar 1 delay 0.2 tell window 1 keystroke "g" using {command down, shift down} repeat until exists sheet 1 delay 0.2 end repeat end tell tell sheet 1 set value of text field 1 to destination_file click button "Go" end tell end tell end tell This works up to the Go To Folder sheet. Then I get: error "System Events got an error: Can’t get sheet 1 of process "FileMaker Pro Advanced". Invalid index." number -1719 from sheet 1 of process "FileMaker Pro Advanced" Can someone tell me what I'm doing wrong?
October 23, 200916 yr Author And farther. I now have a script which works in as itself perfectly, but when run in FMP, it keeps beeping and not performing. I diagnosed this to one error: delay. Anytime I put a delay of any kind in the script, it never opens the Insert QuickTime... window, and so balks at everything after. If there are no delay's, it runs smoothly, unfortunately, so fast, that by the time it gets to the end, all it can do is beep. Can someone tell me what's going on here? Here's the script -- without the delays. tell application "System Events" tell process "FileMaker Pro Advanced" click menu item "QuickTime…" of menu 1 of menu bar item "Insert" of menu bar 1 tell window 1 keystroke "g" using {command down, shift down} //this should open Go To Folder keystroke "v" using {command down} //this pastes the path, which has been checked and is POSIX correct. We're getting here OK. end tell tell window 1 key code 36 //this clicks Enter. By the time it gets here, it just beeps twice and does nothing further, indicating it can't click Enter, Enter end tell tell window 1 key code 36 //this clicks Enter end tell end tell end tell Edited October 23, 200916 yr by Guest
Create an account or sign in to comment