Skip to content

Fixes for Invalid Index errors.#33

Merged
tagavari merged 3 commits intoairmessage:mainfrom
j4byers:main
Sep 18, 2022
Merged

Fixes for Invalid Index errors.#33
tagavari merged 3 commits intoairmessage:mainfrom
j4byers:main

Conversation

@j4byers
Copy link
Copy Markdown
Contributor

@j4byers j4byers commented Sep 16, 2022

@tagavari Hey, I replied to you on Discord -- these are the fixes that have eliminated those AppleScript Invalid Index errors for me. Basically makes use of some repeat loops to detect the presence of the buttons we're looking for, and uses try catch exceptions to prevent stopping on irrelevant errors.

In the future, I might try speeding up the execution of these scripts by replacing some of the arbitrary delays with similar loops.

@tagavari
Copy link
Copy Markdown
Member

Thanks a lot! I've never been able to recreate the invalid index errors, but I've run this through my test cases and everything continues to work as expected.

Are you running AirMessage on an older Mac? I'm wondering because I've done almost all my testing for FaceTime on an M1 Mac, so I'm curious if older / slower machines have an impact on how well these scripts succeed.

@tagavari tagavari merged commit 4ef5c56 into airmessage:main Sep 18, 2022
@mkitchingh
Copy link
Copy Markdown

I'm running it on an m1 mini. It has no keyboard or mouse, but does have a webcam hooked up to it. I can place a FaceTime call from the Mac through a VNC session. I get this every time when attempting through airmessage.
AppleScript error -1719: System Events got an error: Can’t get sheet 1 of window 1 of process "FaceTime". Invalid index.

@tagavari
Copy link
Copy Markdown
Member

There goes my theory. @mkitchingh do you notice anything in common between the times you get this error?

@mkitchingh
Copy link
Copy Markdown

Nothing at all. It has never worked a single time for me. I believe The air changed from the very first version that supported FaceTime to the next versions, but it has been getting this one consistently for a while. I try every time there is an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants