Skip to content

Instantly share code, notes, and snippets.

@sparecycles
Created December 24, 2018 03:32
Show Gist options
  • Save sparecycles/095d38b6a511bd0629d1b788fa46b3f2 to your computer and use it in GitHub Desktop.
Save sparecycles/095d38b6a511bd0629d1b788fa46b3f2 to your computer and use it in GitHub Desktop.
A helper application to keep the EPSON scanner software running
-- Use the Script Editor utility to create an Application with this script.
-- Make sure to save with the "Stay open after run handler" option checked!
-- Run the resulting application while scanning and the scan should progress automatically.
-- Suggestion, use the "Run at Login" option in the dock to always run this helper.
on idle
try -- send a keystroke to EPSON Scan when a progress window is open
with timeout of 1 second
if application id "com.epson.scan.standalone" is running then
tell application id "com.epson.scan.standalone"
if window named "Progress" exists then
keystroke " "
end if
end tell
end if
end timeout
end try
return 1 -- try to reschedule this idle handler every second
end idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment