I’m trying to write an Applescript that accesses EyeTV (yes, I still have one running!). I’m trying to list the recordings in the programs window. From the library:
application n [see also Standard Suite] : the EyeTV application elements contains player_windows, programs, recordings, channels, favorites lists. properties current recording (double integer, r/o) : unique id of the current (frontmost) recording. Returns 0 if there is none. programs window (programs_window, r/o) : schedule dialog
Further down in the dictionary is:
programs_window n [inh. window] : window containing the list of programs and recordings elements contains programs, recordings. properties selection (list of list) : A list containing every selected recording, channel or schedule (program) in the programs window, depending on what the current category is.
If I right click the library and choose “New script” it will helpfully start the script for me:
tell application "EyeTV" end tell
I then add the line that is the problem:
tell application "EyeTV" set recordList to recordings of programs window end tell
If I compile this I get “Syntax Error Expected end of line but found class name.”
If I use
programs_window instead, on running the script the error will be The variable programs_window is not defined.
I found a script someone else has written to export recordings from EyeTV to Plex, and it uses
programs window. If I copy and paste the whole script and try to compile it I again receive the error Syntax Error Expected end of line but found class name.
I’m unsure how to proceed. Should I be referring to the
programs window property of the application or the
programs_window class? How can I get rid of the errors?
I have a copy of the AppleScript Language Guide but it seems to say nothing on the topic of application libraries.
Any help with this would be much appreciated.