Some years in the past Apple dropped assist for my historical Canon Lide 30 scanner. So, I hung it off a Raspberry Pi (which nonetheless helps the scanner through scanimage) and wrote a quite simple Apple Script and an equally easy Bash Shell Script to make it work once more. The Apple Script ran on an Intel iMac and easily requested the person what dimension scan they wished (full web page, half web page, and so forth.) The Apple Script then ran the Bash shell script which in flip ran a command on the Pi:
ssh pi@raspsky 'scanimage -x 210 -y 297 --resolution 300 > scan.ppm'
I exported the AppleScript from Script Editor as an app.
This continues to work fantastic on the Intel iMac.
Then I obtained an M2 MBA. I copied each the AppleScript and the Shell Script to the MBA. I exported the AppleScript from the Tahoe model of Script Editor (Model 2.11 (234)) as an app so it would not want Rosetta to run. Once I “Get Information” on the app it’s a common app, however “Open Utilizing Rosetta” is just not checked.
It really works, however is extremely sluggish and shows the dreaded SPOD on a regular basis that it’s working. I attempted Exercise Monitor whereas it’s working and it’s consuming a really small quantity of CPU time (2%).
So, what further info can I supply up to determine simply what I’ve finished incorrect?
The script:
-- Wrapper for bash shell script which makes use of scanimage
-- Ask the person what dimension to scan
-- Full is an A4 sized scan
-- Half is half an A4
-- Quarter is the highest proper quadrant of the scanner mattress.
set mySize to select from checklist {"Full", "Half", "Quarter", "Passport"} with immediate "Choose A4 scan dimension. Quarter is high proper"
-- Verify to see if the person clicked the Cancel button.
if mySize is fake then
-- The person clicked Cancel so show and confirming dialog and exit
show dialog "Canceled" buttons ("OK") default button "OK"
else
-- The person made a variety so name the shell script and append the chosen dimension to the decision
do shell script "/Customers/mnewman/bin/a4scanpi.sh " & mySize
finish if
-- That is all people
