text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set the current view of container window of the target_folder to list view
|
lns3.scpt
|
set the icon size of list view options of container window of the target_folder to large icon
|
lns3.scpt
|
set uses relative dates of list view options of container window of the target_folder to false
|
lns3.scpt
|
set visible of every column of list view options of container window of the target_folder to true
|
lns3.scpt
|
set the column_list to {comment column, size column, modification date column, creation date column, kind column, label column, version column}
|
lns3.scpt
|
repeat with i from 1 to the count of the column_list
|
lns3.scpt
|
set the index of column (item i of the column_list) of list view options of container window of the target_folder to (i + 1)
|
lns3.scpt
|
set the target_item to this_item as string
|
lns3.scpt
|
set this_image to open file target_item
|
lns3.scpt
|
set these_properties to the properties of this_image
|
lns3.scpt
|
set this_space to the color space of these_properties
|
lns3.scpt
|
repeat with i from 1 to the count of the color_spaces
|
lns3.scpt
|
if this_space is item i of the color_spaces then
|
lns3.scpt
|
set the color_space to item i of the color_space_titles
|
lns3.scpt
|
copy the resolution of these_properties to {image_DPI, y}
|
lns3.scpt
|
set this_depth to the bit depth of these_properties
|
lns3.scpt
|
if this_depth is item i of the bit_depths then
|
lns3.scpt
|
set the bit_depth to item i of the bit_depth_titles
|
lns3.scpt
|
copy the dimensions of these_properties to {image_width, image_height}
|
lns3.scpt
|
set the data_delimiter to ", "
|
lns3.scpt
|
set the comment_string to ¬
|
lns3.scpt
|
"W: " & (image_width as string) & the data_delimiter & ¬
|
lns3.scpt
|
"H: " & (image_height as string) & the data_delimiter & ¬
|
lns3.scpt
|
"R: " & (image_DPI as string) & the data_delimiter & ¬
|
lns3.scpt
|
"BD: " & bit_depth & the data_delimiter & ¬
|
lns3.scpt
|
"CS: " & color_space
|
lns3.scpt
|
set the comment of this_item to the comment_string
|
lns3.scpt
|
property done_foldername : "Flipped Images"
|
lns3.scpt
|
flip this_image with vertical
|
lns3.scpt
|
flip this_image with horizontal
|
lns3.scpt
|
property done_foldername : "TIFF Images"
|
lns3.scpt
|
property originals_foldername : "Original Images"
|
lns3.scpt
|
property newimage_extension : "tif"
|
lns3.scpt
|
property type_list : {"JPEG", "GIFf", "PNGf", "PICT"}
|
lns3.scpt
|
property extension_list : {"jpg", "jpeg", "gif", "png", "pict", "pct"}
|
lns3.scpt
|
set the results_folder to (folder done_foldername of this_folder) as alias
|
lns3.scpt
|
if not (exists folder originals_foldername of this_folder) then
|
lns3.scpt
|
make new folder at this_folder with properties {name:originals_foldername}
|
lns3.scpt
|
set the originals_folder to folder originals_foldername of this_folder
|
lns3.scpt
|
my resolve_conflicts(this_item, originals_folder, "")
|
lns3.scpt
|
set the new_name to my resolve_conflicts(this_item, results_folder, newimage_extension)
|
lns3.scpt
|
set the source_file to (move this_item to the originals_folder with replacing) as alias
|
lns3.scpt
|
process_item(source_file, new_name, results_folder)
|
lns3.scpt
|
on resolve_conflicts(this_item, target_folder, new_extension)
|
lns3.scpt
|
if the new_extension is "" then
|
lns3.scpt
|
set target_name to file_name
|
lns3.scpt
|
set target_extension to file_extension
|
lns3.scpt
|
set target_extension to new_extension
|
lns3.scpt
|
set target_name to (the trimmed_name & "." & target_extension) as string
|
lns3.scpt
|
if (exists document file target_name of target_folder) then
|
lns3.scpt
|
set the new_name to (the trimmed_name & "." & (name_increment as string) & "." & target_extension) as string
|
lns3.scpt
|
set the name of document file target_name of the target_folder to the new_name
|
lns3.scpt
|
return the target_name
|
lns3.scpt
|
on process_item(source_file, new_name, results_folder)
|
lns3.scpt
|
set the target_path to ((results_folder as string) & new_name) as string
|
lns3.scpt
|
set this_image to open file (source_file as string)
|
lns3.scpt
|
save this_image as TIFF in file target_path with icon
|
lns3.scpt
|
property done_foldername : "PNG Images"
|
lns3.scpt
|
property newimage_extension : "png"
|
lns3.scpt
|
property type_list : {"TIFF", "JPEG", "GIFf", "PICT"}
|
lns3.scpt
|
property extension_list : {"tif", "tiff", "jpg", "jpeg", "gif", "pict", "pct"}
|
lns3.scpt
|
save this_image as PNG in file target_path with icon
|
lns3.scpt
|
property done_foldername : "JPEG Images"
|
lns3.scpt
|
property newimage_extension : "jpg"
|
lns3.scpt
|
property type_list : {"TIFF", "GIFf", "PNGf", "PICT"}
|
lns3.scpt
|
property extension_list : {"tif", "tiff", "gif", "png", "pict", "pct"}
|
lns3.scpt
|
save this_image as JPEG in file target_path with icon
|
lns3.scpt
|
property done_foldername : "Original Images"
|
lns3.scpt
|
property done_foldername : "PDF Files"
|
lns3.scpt
|
property originals_foldername : "Original Files"
|
lns3.scpt
|
property newimage_extension : "pdf"
|
lns3.scpt
|
property type_list : {"EPSF"}
|
lns3.scpt
|
property extension_list : {"eps", "ps"}
|
lns3.scpt
|
set the source_item to the quoted form of the POSIX path of the source_file
|
lns3.scpt
|
set the target_path to the quoted form of the POSIX path of (((results_folder as string) & new_name) as string)
|
lns3.scpt
|
do shell script ("pstopdf " & source_item & " -o " & target_path)
|
lns3.scpt
|
on closing folder window for this_folder
|
lns3.scpt
|
repeat with EachFolder in (get every folder of folder this_folder)
|
lns3.scpt
|
close window of EachFolder
|
lns3.scpt
|
end closing folder window for
|
lns3.scpt
|
set the folder_name to the name of this_folder
|
lns3.scpt
|
set alert_message to ("Folder Actions Alert:" & return & return) as Unicode text
|
lns3.scpt
|
if the item_count is greater than 1 then
|
lns3.scpt
|
set alert_message to alert_message & (the item_count as text) & " new items have "
|
lns3.scpt
|
set alert_message to alert_message & "One new item has "
|
lns3.scpt
|
set alert_message to alert_message & "been placed in folder " & «data utxt201C» & the folder_name & «data utxt201D» & "."
|
lns3.scpt
|
set the alert_message to (the alert_message & return & return & "Would you like to view the added items?")
|
lns3.scpt
|
display dialog the alert_message buttons {"Yes", "No"} default button 2 with icon 1 giving up after dialog_timeout
|
lns3.scpt
|
if user_choice is "Yes" then
|
lns3.scpt
|
open this_folder
|
lns3.scpt
|
reveal the added_items
|
lns3.scpt
|
property ChooseFolderPrompt : "Select folder(s) to remove folder actions from "
|
lns3.scpt
|
property ChooseScriptPrompt : "Select script(s) to remove from "
|
lns3.scpt
|
property NoFoldersActionsExist : "There are no folder actions."
|
lns3.scpt
|
set FolderActionNames to name of every folder action
|
lns3.scpt
|
if FolderActionNames is not {} then
|
lns3.scpt
|
set ChosenFolders to choose from list FolderActionNames ¬
|
lns3.scpt
|
with prompt ChooseFolderPrompt with multiple selections allowed
|
lns3.scpt
|
if class of ChosenFolders is boolean then
|
lns3.scpt
|
repeat with EachFolder in ChosenFolders
|
lns3.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.