text
stringlengths
0
15.7k
source
stringlengths
6
112
if ((count of msgs) < 1) then return
archive.scpt
set mailFolders to mail folders
archive.scpt
repeat with fld in mailFolders
archive.scpt
if (name of fld is "Archived") then
archive.scpt
set target to fld
archive.scpt
target
archive.scpt
display dialog "You need to create a folder named Archived."
archive.scpt
if (class of account of msg is not imap account) then
archive.scpt
move msg to target
archive.scpt
set the source_folder to path to desktop folder as alias
CreateFolders.scpt
display dialog "Enter Job Number:" default answer "" buttons {"Cancel", "OK"} default button 2
CreateFolders.scpt
set the job_number to the text returned of the result
CreateFolders.scpt
if the job_number is not "" then exit repeat
CreateFolders.scpt
display dialog "Enter Customer:" default answer "" buttons {"Cancel", "OK"} default button 2
CreateFolders.scpt
set the customer_name to the text returned of the result
CreateFolders.scpt
if the customer_name is not "" then exit repeat
CreateFolders.scpt
display dialog "Enter Number of Parts:" default answer "1" buttons {"Cancel", "OK"} default button 2
CreateFolders.scpt
set job_parts to (the text returned of the result) as integer
CreateFolders.scpt
if class of job_parts is integer then exit repeat
CreateFolders.scpt
on addFolders(pf)
CreateFolders.scpt
make new folder at pf with properties {name:"PRINT"}
CreateFolders.scpt
make new folder at pf with properties {name:"Preflight Reports"}
CreateFolders.scpt
make new folder at pf with properties {name:"Source Files"}
CreateFolders.scpt
end addFolders
CreateFolders.scpt
set parentFolder to make new folder at source_folder with properties {name:job_number & "." & customer_name}
CreateFolders.scpt
if job_parts > 1 then
CreateFolders.scpt
repeat with i from 0 to (job_parts - 1)
CreateFolders.scpt
set suffix to "."
CreateFolders.scpt
if i < 10 then
CreateFolders.scpt
set suffix to suffix & "0"
CreateFolders.scpt
set suffix to suffix & i
CreateFolders.scpt
set newFolder to make new folder at parentFolder with properties {name:job_number & suffix}
CreateFolders.scpt
my addFolders(newFolder)
CreateFolders.scpt
my addFolders(parentFolder)
CreateFolders.scpt
set scel to selection as text
MakeAlias.applescript
set scel to POSIX path of scel
MakeAlias.applescript
set als to " alias"
MakeAlias.applescript
set lnscel to scel & als
MakeAlias.applescript
set scel to quoted form of scel
MakeAlias.applescript
set lnscel to quoted form of lnscel
MakeAlias.applescript
do shell script "ln -s " & scel & " " & lnscel
MakeAlias.applescript
windowMove's windowMove(0, -1)
windowMoveUp.applescript
tell application "Finder" to set ptd to POSIX path of (choose folder with prompt "File Location:" default location (path to desktop))
create folders.scpt
set theText to subject of theMessage
create folders.scpt
set AList to every mail attachment of theMessage
create folders.scpt
set theFile to ptd & theText & (theText as string)
create folders.scpt
set savepath to "'" & ptd & theText & "'"
create folders.scpt
make new folder at POSIX file ptd with properties {name:theText}
create folders.scpt
do shell script "chmod -R 777 " & savepath
create folders.scpt
repeat with aFile in AList
create folders.scpt
set Filepath to ptd & theText & "/" & (name of aFile)
create folders.scpt
save aFile in (POSIX file Filepath) as native format
create folders.scpt
end repeat -- next file
create folders.scpt
set {vol, gave} to {button returned, gave up} of (display dialog "Volume" buttons {"High", "Low", "Cancel"} cancel button 3 with icon note giving up after 1800)
Change Volume.applescript
if vol contains "High" then set volume 6
Change Volume.applescript
if vol contains "Low" then set volume 4
Change Volume.applescript
set this_count to count of this_selection
_Set Name To Title Of Web Page.applescript
if this_count > 0 then
_Set Name To Title Of Web Page.applescript
show progress indicator "Renaming" steps this_count
_Set Name To Title Of Web Page.applescript
set this_type to the type of this_item
_Set Name To Title Of Web Page.applescript
set this_source to missing value
_Set Name To Title Of Web Page.applescript
step progress indicator (name of this_item) as string
_Set Name To Title Of Web Page.applescript
if this_type is equal to html or this_type is equal to webarchive then
_Set Name To Title Of Web Page.applescript
set this_source to source of this_item
_Set Name To Title Of Web Page.applescript
else if this_type is equal to bookmark then
_Set Name To Title Of Web Page.applescript
set this_URL to the URL of this_item
_Set Name To Title Of Web Page.applescript
if this_URL is not "" then set this_source to download markup from this_URL
_Set Name To Title Of Web Page.applescript
if this_source is not missing value then
_Set Name To Title Of Web Page.applescript
set this_title to get title of this_source
_Set Name To Title Of Web Page.applescript
if this_title is not missing value and this_title is not "" then set the name of this_item to this_title
_Set Name To Title Of Web Page.applescript
tell track id 40652
test-update.applescript
if loc = "Macintosh HD:Users:paul:Public:Music:Library:Stevie Wonder:#1s:08 Living For The City.mp3" then
test-update.applescript
set unplayed to true
test-update.applescript
if played date > low_date then
test-update.applescript
set played date to low_date
test-update.applescript
set toEnc to "utf-8"
Change text encoding.applescript
set theDir to (path to home folder as string) & "DropBox:WritePad:"
Change text encoding.applescript
tell application "Finder" to get the document files of alias theDir
Change text encoding.applescript
set i to the result
Change text encoding.applescript
if (name extension of j) as string is "txt" then
Change text encoding.applescript
set thePlainFile to the POSIX path of (j as alias)
Change text encoding.applescript
set theFile to the quoted form of thePlainFile
Change text encoding.applescript
set theEncoding to (do shell script "file -bI " & theFile)
Change text encoding.applescript
if the first word of theEncoding is "text" then
Change text encoding.applescript
set theEncoding to the last text item of theEncoding
Change text encoding.applescript
if theEncoding is not "us-ascii" and theEncoding is not "utf-8" then
Change text encoding.applescript
set ext to "." & the time of the (current date) as string
Change text encoding.applescript
set newName to the quoted form of (thePlainFile & ext)
Change text encoding.applescript
do shell script ("mv " & the quoted form of thePlainFile & " " & newName)
Change text encoding.applescript
do shell script ("iconv -f " & theEncoding & " -t " & toEnc & " " & newName & " > " & theFile)
Change text encoding.applescript
set mlist to every file of current_folder
Sort Files Into Folder By Extension.applescript
if (exists folder cur_ext of current_folder) is false then
Sort Files Into Folder By Extension.applescript
make new folder with properties {name:cur_ext} at current_folder
Sort Files Into Folder By Extension.applescript
move this_file to folder cur_ext of current_folder
Sort Files Into Folder By Extension.applescript
fmGUI_ManageLayouts_Select({layoutName:"Directory"})
fmGUI_ManageLayouts_Select.applescript
set defaultPrefs to {layoutName:null}
fmGUI_ManageLayouts_Select.applescript
set searchTextField to text field 1 of contextWindow
fmGUI_ManageLayouts_Select.applescript
set searchButton to button 1 of text field 1 of contextWindow
fmGUI_ManageLayouts_Select.applescript
fmGUI_TextFieldSet({objRef:searchTextField, objValue:layoutName})
fmGUI_ManageLayouts_Select.applescript
fmGUI_ObjectClick_Button({buttonRef:searchButton})
fmGUI_ManageLayouts_Select.applescript