• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Abby FineReader and ScanSnap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abby FineReader and ScanSnap


  • Subject: Re: Abby FineReader and ScanSnap
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 04 Apr 2012 21:11:32 +0200


Le 4 avr. 2012 à 20:48, Neil Laubenthal a écrit :

On Apr 4, 2012, at 11:15 AM,4/4, KOENIG Yvan wrote:

Thanks; that compiles and works but only lets me choose a single file at a time using the choose file dialog. What would I need to change to allow me to select a bunch of files and drop them onto the script for sequential processing and/or use it as a Folder Action Script so I can batch process things?

I can read that script and understand how it's doing it's work; but not being much of a programmer or scripter it is far beyond what I could produce on my own. I've gotten pretty good at modifying/borrowing from other scripts over the years to cobble stuff together but have never really been able to do much from scratch.

Here is an enhanced one.

--[SCRIPT]
on run
doyourduty(choose file of type "com.adobe.pdf" with multiple selections allowed)
end run

on open droppedItems
doyourduty(droppedItems)
end open

on doyourduty(theItems)
repeat with anItem in theItems
tell application "System Events"
set {name:fileName, type identifier:typeID, class:itemClass, container:parentFolder} to disk item (anItem as text)
set isFolder to itemClass is folder
end tell
if isFolder then
tell application "Finder" to set itemList to items of anItem
doyourduty(itemList)
else
if typeID is "com.adobe.pdf" then
read anItem
my remplace(result, "/Creator 49 0 R /", "/Creator (ScanSnap Manager) /")
write result to anItem
end if
end if
end repeat
end doyourduty

--=====
(*
replaces every occurences of d1 by d2 in the text t
*)
on remplace(t, d1, d2)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d1
set l to text items of t
set AppleScript's text item delimiters to d2
set t to "" & l
set AppleScript's text item delimiters to oTIDs
return t
end remplace

--=====
--[/SCRIPT]


Yvan KOENIG (VALLAURIS, France) mercredi 4 avril 2012 21:11:15


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Abby FineReader and ScanSnap (From: Neil Laubenthal <email@hidden>)
 >Re: Abby FineReader and ScanSnap (From: KOENIG Yvan <email@hidden>)
 >Re: Abby FineReader and ScanSnap (From: Neil Laubenthal <email@hidden>)

  • Prev by Date: Re: Abby FineReader and ScanSnap
  • Next by Date: Folder actions questions
  • Previous by thread: Re: Abby FineReader and ScanSnap
  • Next by thread: Folder actions questions
  • Index(es):
    • Date
    • Thread