text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set the script_text to the script_text & tab & "display dialog the error_text buttons {\"OK\"} default button 1" & CR
|
lns3.scpt
|
set the script_text to the script_text & tab & "return the error_text" & CR
|
lns3.scpt
|
set the script_text to the script_text & "try" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & the target_string & return
|
lns3.scpt
|
set the script_text to the script_text & "on error the error_message number the error_number" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "display dialog \"Error: \" & the error_number & \". \" & the error_message buttons {\"OK\"} default button 1" & return
|
lns3.scpt
|
set the script_text to the script_text & "end try" & return
|
lns3.scpt
|
set the script_text to the script_text & "end try" & the target_string & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "display dialog \"Error: \" & the error_number & \". \" & the error_message buttons {\"Cancel\"} default button 1" & CR
|
lns3.scpt
|
set the script_text to the script_text & "on removing folder items from this_folder after losing these_items" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end removing folder items from" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end removing folder items from" & target_string & CR
|
lns3.scpt
|
set the script_text to the script_text & "on opening folder this_folder" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end opening folder" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end opening folder" & target_string & CR
|
lns3.scpt
|
set the script_text to the script_text & "on moving folder window for this_folder from original_bounds" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end moving folder window for" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end moving folder window for" & target_string & CR
|
lns3.scpt
|
set the script_text to the script_text & "on closing folder window for this_folder" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end closing folder window for" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end closing folder window for" & target_string & CR
|
lns3.scpt
|
set the script_text to the script_text & "on adding folder items to this_folder after receiving these_items" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end adding folder items to" & CR
|
lns3.scpt
|
set the script_text to the script_text & "end adding folder items to" & target_string & CR
|
lns3.scpt
|
display dialog "Enter the scale percentage:" default answer "100"
|
lns3.scpt
|
set this_value to the text returned of the result as integer
|
lns3.scpt
|
if this_value is greater than 0 then
|
lns3.scpt
|
set the scale_factor to (this_value * 0.01) as string
|
lns3.scpt
|
if the error_number is -128 then
|
lns3.scpt
|
return "user cancelled"
|
lns3.scpt
|
set the script_text to "" & return
|
lns3.scpt
|
set the script_text to the script_text & "tell application \"Image Events\"" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set this_image to open " & selected_text & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "scale this_image by factor " & scale_factor & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "save this_image in " & selected_text & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "close this_image" & return
|
lns3.scpt
|
set the script_text to the script_text & "end tell--XXXX"
|
lns3.scpt
|
display dialog "Please select text in this script that is either:
|
lns3.scpt
|
1) The name of a variable containing an alias reference to an image file, such as: this_image or thisImage
|
lns3.scpt
|
2) An alias reference to an image file, such as: alias \"Macintosh HD:Images:Picture.01.jpg\"" buttons {"Help", "OK"} default button 2
|
lns3.scpt
|
set the script_text to the script_text & tab & "rotate this_image to angle -90" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "rotate this_image to angle 90" & return
|
lns3.scpt
|
display dialog "Enter the desired dimension (in pixels) of the longest side of the image:" default answer ""
|
lns3.scpt
|
if this_value is greater than or equal to 6 then
|
lns3.scpt
|
set the target_dimension to (this_value as string)
|
lns3.scpt
|
set the script_text to the script_text & tab & "scale this_image to size " & target_dimension & return
|
lns3.scpt
|
set the script_text to the script_text & "tell application \"Finder\"" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set these_items to the selection" & return
|
lns3.scpt
|
set the script_text to the script_text & "end tell" & return
|
lns3.scpt
|
set the script_text to the script_text & "repeat with i from 1 to the count of these_items" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set this_item to (item i of these_items) as alias" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set this_info to info for this_item" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & target_string & return
|
lns3.scpt
|
set the script_text to the script_text & "end repeat"
|
lns3.scpt
|
set the replacement_string to "-- insert actions here for: this_item"
|
lns3.scpt
|
display dialog error_message buttons {"OK"} default button 1 with icon 2
|
lns3.scpt
|
set the script_text to the script_text & "set this_folder to (choose folder with prompt \"Pick the folder containing the images to process:\") as string" & return
|
lns3.scpt
|
set the script_text to the script_text & "tell application \"System Events\"" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set these_files to every file of folder this_folder whose name does not start with \".\" and (file type is \"TIFF\" or file type is \"JPEG\" or name extension is \"tiff\" or name extension is \"tif\" or name extension is \"jpeg\" or name extension is \"jpg\")" & return
|
lns3.scpt
|
set the script_text to the script_text & "repeat with i from 1 to the count of these_files" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set this_file to (item i of these_files as alias)" & return
|
lns3.scpt
|
display dialog error_message buttons {"OK"} default button 1
|
lns3.scpt
|
set the script_text to the script_text & "set this_folder to (choose folder with prompt \"Pick the folder containing the files to process:\") as string" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set these_files to every file of folder this_folder" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set this_info to info for this_file" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "if visible of this_info is true and alias of this_info is false then" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & tab & target_string & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "end if" & return
|
lns3.scpt
|
set the replacement_string to "-- insert actions here for: this_file"
|
lns3.scpt
|
set the script_text to the script_text & return & "set the item_count to the number of items in " & the selected_text & return
|
lns3.scpt
|
set the script_text to the script_text & "repeat with i from 1 to the item_count" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "set this_item to item i of " & the selected_text & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "if i is the item_count then" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "else" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "-- insert actions for the other items" & return
|
lns3.scpt
|
set the replacement_string to "-- insert actions for the last item"
|
lns3.scpt
|
1) The name of a variable containing a list, such as: new_colors or newColors
|
lns3.scpt
|
2) A list of items, such as: {\"red\", \"blue\", \"yellow\"}" buttons {"Help", "OK"} default button 2
|
lns3.scpt
|
set the script_text to the script_text & tab & "if i is 1" & return
|
lns3.scpt
|
set the replacement_string to "-- insert actions for the first item"
|
lns3.scpt
|
set the script_text to the script_text & tab & "if i is 1 -- first list item" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "else if i is the item_count then -- last list item" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "-- insert actions for: this_item" & return
|
lns3.scpt
|
set the script_text to the script_text & tab & "else -- other list items" & return
|
lns3.scpt
|
set the replacement_string to "-- insert actions for: this_item"
|
lns3.scpt
|
set the script_text to the script_text & return & "repeat with i from 1 to number of items in " & the selected_text & return
|
lns3.scpt
|
set the comparison_parameters to {"case", "diacriticals", "expansion", "hyphens", "punctuation", "white space"}
|
lns3.scpt
|
set the the chosen_parameters to (choose from list comparison_parameters with prompt "Pick the parameter(s) to ignore: (Command-key for multiple)" with multiple selections allowed)
|
lns3.scpt
|
if the chosen_parameters is false then return "user cancelled"
|
lns3.scpt
|
set the parameter_count to the count of the chosen_parameters
|
lns3.scpt
|
if the parameter_count is 1 then
|
lns3.scpt
|
set the parameter_string to the chosen_parameters as string
|
lns3.scpt
|
set the parameter_string to ""
|
lns3.scpt
|
repeat with i from 1 to the parameter_count
|
lns3.scpt
|
set this_item to item i of chosen_parameters
|
lns3.scpt
|
set the parameter_string to the parameter_string & this_item
|
lns3.scpt
|
else if i is the parameter_count then
|
lns3.scpt
|
set the parameter_string to the parameter_string & " and " & this_item
|
lns3.scpt
|
set the parameter_string to the parameter_string & ", " & this_item
|
lns3.scpt
|
set the script_text to the script_text & "ignoring" & space & the parameter_string & CR
|
lns3.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.