AnsweredAssumed Answered

FM calling AppleScript and trapping for Errors

Question asked by JFWX5 on Feb 25, 2015
Latest reply on Feb 26, 2015 by JFWX5

Hi All,



I’ve been using my ScanSnap with Snap2FM to scan documents in to a container field in my FileMaker solution.


Here are my steps.


A) I have a FM script that calls an Applescript to change to the desired scanning profile in ScanSnap for the document type being scanned: i.e. one/two side, Legal, letter, jpeg, pdf, etc


B) The FM script then changes to the proper layout.


C) I load the document into the scanner and hit the scanner button, document drops into the FM container!


All was working great!



Now that I switched to Yosemite.  Each day the first time I invoke the FM script calling the applescript to change profiles I get



"System Events got an error: Can’t get window 1 of application process "ScanSnap Manager". Invalid index.”


with the OK dialog, then I get the FM


“ unknown Error: -1719”


with the OK dialog,



I then have to manually click on the ScanSnap manager, select the profile required and everything works great till the user logs out for the day.


After a lot of testing I believe that there is something in Yosemite preventing the Applescript from working the first scan of the day, as it had worked flawless under the last two versions of OS X.

 


The question is how do I trap for the two errors above so that the user is not taken some where they don’t belong?




Thank you




John

Outcomes