Hello
I am working on a script for Bookpedia to add books from a list of ebook files. I can’t seem to get the script to edit a table field and then release its focus. Here’s where I get stuck:
click radio button "Links"
repeat with aFile in files_
click button 1
keystroke item 2 of aFile
tell scroll area 1
tell table 1
tell table row 1
tell text field 1
set focused to false
end tell
end tell
end tell
end tell
set value of text field 1 to item 1 of aFile
end repeat
I can post the whole script but its a little long. Basically, when you click add in bookpedia’s links panel, it auto focuses on the first field of a new table row. That’s great. I can immediatly use a keystroke command to enter a new value. But how do I release?? I need to move on (with the row selected) and edit a neighboring text field. It batch processes files, hence the repeat. The list “aFile” is like {location, kind}, strings which describe the file.
So, oh scripting gods, how do I change the focus and stop editing the cell??
Model: Macbook (black)
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)