I do know that Apple broke/removed the ascending/descending toggle for sorting files in the Finder in Lion and they have not restored it yet.
Thanks Apple. (sarcasm)
What you might have to do is identify the column header that is the "Size" sort and physically click on the on column header. Toggling sort order of a Finder window when in List view will not work unless you have the "Arrange By" criteria set to "None".
I have no idea why they added this retarded functionality that breaks sorting.
In Snow Leopard and before, you could press command control 1, 2, 3, 4, 5… and then press the same key combination again to toggle ascending/descending sort order.
It's gone in Lion and Mountain Lion and it blows. On Dec 14, 2012, at 11:33 AM, Trisha Davidson wrote:
Hello! I'm trying to create a script that, when a folder is dropped on it, will open the enclosed PDF's in Acrobat, check the size and do a save as to the appropriate folder.
For example: If the PDF is {0, 468, 684, 0} it should save as to the 0_Flat folder created earlier in the script, without changing the file name, and other sizes will go to the 0_Folded folder. When I run my script it acts like it will work until it comes to the save, then it errors saying that the document or Acrobat doesn't understand the save message.
I'm very new to Applescripting, any pointers would be greatly appreciated. Thank you!!
Trisha
Here is my script:
on open aList
with timeout of (30 * minutes) seconds
set CustFolder to item 1 of aList
tell application "Finder"
set AppleScript's text item delimiters to {":"}
set PathList to text items of (aList as text)
set PathCount to count of items in PathList
set AppleScript's text item delimiters to {""}
set OriginalfileList to name of every file of CustFolder
set fileCount to count of items in OriginalfileList
set FlatFolder to (CustFolder & "0_Flat:") as string
set FoldFolder to (CustFolder & "0_Folded:") as string
set FlatFile to (FlatFolder)
set FoldFile to (FoldFolder)
try
set FlatFolder to make new folder at alias CustFolder with properties {name:"0_Flat"}
end try
try
set FoldFolder to make new folder at alias CustFolder with properties {name:"0_Folded"}
end try
try
set OriginalFolder to make new folder at alias CustFolder with properties {name:"0_Original"}
end try
repeat with t from 1 to fileCount
set saveNo to "Yes"
tell application "Adobe Acrobat Pro"
set theDocA to item t of OriginalfileList
open ((CustFolder & theDocA) as string)
tell document theDocA
tell page 1
set {0, theHeight, theWidth, 0} to bleed box
set the_number_to_round to theHeight
set the_decimal_precision to 1
my round_to_decimal_places(the_number_to_round, the_decimal_precision)
set theHeight to result
set the_number_to_round to theWidth
set the_decimal_precision to 1
my round_to_decimal_places(the_number_to_round, the_decimal_precision)
set theWidth to result
end tell
end tell
if theHeight is 468 and theWidth is 684 then
set FlatFile to (FlatFolder)
else
set FoldFile to (FoldFolder)
end if
save document theDocA with linearize
close document theDocA saving no
end tell
end repeat
tell application "Finder"
repeat with i in OriginalfileList
move i to folder "0_Originals" of CustFolder
end repeat
display dialog "UHG script has completed successfully."
end tell
end tell
end timeout
end open
on round_to_decimal_places(the_number_to_round, the_decimal_precision)
set multiplier to 10 ^ the_decimal_precision
the_number_to_round * multiplier
round result
return result / multiplier
end round_to_decimal_places
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
|