Hi all
I still use EyeTV4 for recording on-air TV in the UK, but its makers Geniatech have closed down the paid subscription service for the EPG, leaving us with just on air DVB listings. Of course they made the paid service automated for updates but not the free one. So I wrote a script which updates the EPG by clicking on a refresh icon in the EPG screen.
The script works perfectly when invoked manually, either from within Script Editor or by clicking the scripted app I made. But if you let the display sleep (the Mac is set not to let the disks sleep or auto-sleep when the display is off, so the only sleeping which happens is the display goes off), then it fails, every time. I have tried calling the app from Lingon and from a calendar event, same problem. I have tried setting energy saver to wake from sleep 5 mins before the script runs, same problem. I have removed and re-added the script to Accessibility, Files & Folders and Full Disk Access in the Security & Privacy preference panel. Script Editor also has privileges in Accessibility and FDA. But always the same error…
System Events got an error: Can’t get window 1 of process “EyeTV”. Invalid index. (-1719)
i.e. it can’t access the main EyeTV window unless the process is launched manually.
My script is:
tell application "EyeTV"
activate
enter full screen
end tell
delay 2
tell application "System Events"
delay 2
tell process "EyeTV"
keystroke "g" using command down
delay 1
click (button 6 of splitter group 1 of window 1)
end tell
end tell
(Formatting backticks added by NG.)
Keystroke “g” makes sure that the EPG window of EyeTV is the open one. Button 6 etc. is the refresh button in the corner of the EPG window.
Can anyone think of anything I can do to make this run, please?
Thanks in advance for any ideas.
Regards
TP