Finder Got An Error Appleevent Timed Out
Contents |
event timed out" (-1712) This error can
Apple Event Timed Out Diskmaker
happen when an event takes an unusually long time to complete. If an event takes
Applescript Increase Timeout
longer than two minutes, the Apple Event Manager reports a time-out error. This error can sometimes be generated when: • You are using the FileMakerPro Show event to find records in applescript with timeout example a large database • FileMakerPro presents a dialog box waiting for the scripter's (user's) response • An event takes a long time to occur, such as opening a networked file when there is heavy network traffic. To prolong the amount of time AppleScript waits for a response: Use the "with timeout" statement. An example of such a statement that increases the wait time to five minutes is: tell application "FileMakerPro"with timeout of 300 secondsShow (every Record whose Cell "Product" contains "FileMakerPro")end timeoutend tell Was this topic helpful? Send feedback.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About
Applescript Without Timeout
Us Learn more about Stack Overflow the company Business Learn more about hiring applescript try with timeout developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join apple event errors the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Applescript - Apple Event Timed http://www.filemaker.com/help/12/fmp/html/create_script.13.16.html out up vote 1 down vote favorite I'm trying to open a very large excel file (*.xls) using applescript. The code is very simple, it looks like it is working, however after a few minutes I receive the following message: Result: error "Microsoft Excel got an error: AppleEvent timed out." number -1712 Any idea about how to solve it? BTW using the automator doesn't work either. http://stackoverflow.com/questions/22446276/applescript-apple-event-timed-out Here's my code tell application "Microsoft Excel" activate open "/Users/sergioguerra1/Desktop/Detektor/Etapa II/Reporte General.xls" delay 300 end tell excel applescript apple share|improve this question asked Mar 17 '14 at 3:08 user3416401 153 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted Try wrapping the open command in a with timeout block. eg. tell application "Microsoft Excel" activate with timeout of 3600 seconds open "/Users/sergioguerra1/Desktop/Detektor/Etapa II/Reporte General.xls" end timeout end tell This will override Applescripts default timeout of 2 mins, giving it longer to finish executing that command. More info here in the AppleScript docs. share|improve this answer answered Mar 17 '14 at 3:39 adamh 2,3221917 Thank you very much! –user3416401 Mar 17 '14 at 4:01 add a comment| up vote 0 down vote Conversely, if you are wanting to open your excel file/s without having to wait 2 minutes or longer ( eg 3600 secs) for a timeout to occur, then you may prefer to delibertely trigger the timeout sooner, and catch the error with "try" block. I've found this problem occurs when I use the "linked tables" feature in excel, and the linked table is no longer accessa
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn http://stackoverflow.com/questions/5250824/applescript-timeout-when-screen-is-locked more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Applescript timeout when screen is locked up vote 2 down vote favorite I am getting an AppleEvent timed out error when my Applescript is running and timed out the screensaver turns on and locks the screen. The applescript completes the current operation and when trying to do the next Finder operation it does not proceed but waits and times out. I cannot increase the time-out time limit since I will not unlock the screen at all. Is there a way to ignore waiting for the screen unlock or some other solution to this? Thanks in advance. applescript share|improve this question asked Mar 9 '11 event timed out at 19:03 Pradeep 1,120925 The best answer i have received (from macscripter.net) is to use shell commands instead of Finder commands to avoid this timeout) –Pradeep Mar 30 '11 at 22:04 add a comment| 5 Answers 5 active oldest votes up vote 1 down vote accepted The best answer I have received (from macscripter.net) is to use shell commands instead of Finder commands to avoid this timeout. share|improve this answer edited Jan 16 '13 at 17:12 rjb 6,56912433 answered Apr 13 '11 at 17:28 Pradeep 1,120925 add a comment| up vote 0 down vote I don't know how you could bypass the locked screen so your code keeps working, however you might use an if statement such that when the screen saver is running then your code isn't executed. That would at least prevent the timeout error. For example suppose you wanted to run a repeat loop 10 times for some reason, and you wanted not to run some code when the screen saver is running... you could do this. set i to 0 repeat set screenSaverEngineIsRunning to false tell application "System Events" if (exists process "ScreenSaverEngine") then set screenSaverEngineIsRunning to true end tell if not screenSaverEngineIsRunning then set i to i + 1 -- do some code here end if delay 1 if i is 10 then exit repeat end repeat share|improve t