Skip to content

Commit

Permalink
Catch error that occurs if the opening app quits while the script is …
Browse files Browse the repository at this point in the history
…running.
  • Loading branch information
lapcat committed Nov 28, 2023
1 parent aa51812 commit 17e2c88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/JJApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ repeat while (count menu bars) = 0\n\
click menu item %@ of menu 1 of menu bar item 3 of menu bar 1\n\
end tell\n\
if (restoreold) then\n\
try\n\
set frontmost of oldapp to true\n\
end try\n\
end if\n\
end tell";
NSString* menuItem = [@PRODUCT_NAME isEqualToString:@"PrivateWindow"] ? @"2" : @"1";
Expand Down

0 comments on commit 17e2c88

Please sign in to comment.