text
stringlengths
0
15.7k
source
stringlengths
6
112
else if (alias of the item_info is false) and ¬
lns3.scpt
((the file type of the item_info is in the type_list) or ¬
lns3.scpt
the name extension of the item_info is in the extension_list) then
lns3.scpt
set theFilePath to (this_item as string)
lns3.scpt
on processFile(thePOSIXFileName)
lns3.scpt
set terminalCommand to ""
lns3.scpt
set convertCommand to "/System/Library/Printers/Libraries/./convert "
lns3.scpt
set newFileName to thePOSIXFileName & ".ps"
lns3.scpt
set terminalCommand to convertCommand & "-f " & "\"" & thePOSIXFileName & "\"" & " -o " & "\"" & newFileName & "\"" & " -j \"application/postscript\""
lns3.scpt
do shell script terminalCommand
lns3.scpt
end processFile
lns3.scpt
set these_items to (choose file with prompt "Select a file to convert to PDF:" of type {"JPEG", "GIFf", "PICT", "TIFF", "TEXT", "RTF"}) as list
lns3.scpt
set newFileName to thePOSIXFileName & ".pdf"
lns3.scpt
set terminalCommand to convertCommand & "-f " & "\"" & thePOSIXFileName & "\"" & " -o " & "\"" & newFileName & "\"" & " -j \"application/pdf\""
lns3.scpt
set carriage_return to return as text
lns3.scpt
set message_A to "The Print… scripts print (in text) the contents of a folder." & ¬
lns3.scpt
carriage_return & carriage_return & ¬
lns3.scpt
"To use these scripts as droplets, open the appropriate script (/Library/Scripts/Printing Scripts) in ScriptEditor and save the script as an application. Then drag the folder(s) on to the new application." & ¬
lns3.scpt
"A script can also be opened in Script Editor by holding down the Option Key while selecting that script in the Scripts menu."
lns3.scpt
display dialog message_A buttons {"OK"} default button 1 with icon note
lns3.scpt
set message_A to "The Convert… scripts convert a file to PDF or PostSctript." & ¬
lns3.scpt
"To convert files in batch mode, open the appropriate script (/Library/Scripts/Printing Scripts) in ScriptEditor and save the script as an application. Then drag the files to be converted on to the new application." & ¬
lns3.scpt
set current pane to pane "com.apple.preference.sound"
lns3.scpt
tell slider 1 of window "Sound" of process "System Preferences"
lns3.scpt
if value is 0.5 then
lns3.scpt
set value to 0.8
lns3.scpt
set value to 0.5
lns3.scpt
display dialog "Error: " & errMsg
lns3.scpt
get every UI element
lns3.scpt
get every button
lns3.scpt
get properties of every button
lns3.scpt
get every UI element of every button
lns3.scpt
get every static text
lns3.scpt
get properties of every static text
lns3.scpt
get every UI element of every static text
lns3.scpt
get every scroll bar
lns3.scpt
get properties of every scroll bar
lns3.scpt
get every UI element of every scroll bar
lns3.scpt
get every UI element whose class is not button and class is not static text and class is not scroll bar
lns3.scpt
get properties of every UI element whose class is not button and class is not static text and class is not scroll bar
lns3.scpt
display dialog "The 'Probe Window' script was executed, it uses UI element scripting to get information about the top window in the Finder, to see results run it within AppleScript Editor."
lns3.scpt
get every process
lns3.scpt
get every menu bar
lns3.scpt
tell menu bar 1
lns3.scpt
get every menu bar item
lns3.scpt
get every menu of every menu bar item
lns3.scpt
get every menu item of every menu of every menu bar item
lns3.scpt
get every menu of every menu item of every menu of every menu bar item
lns3.scpt
get every menu item of every menu of every menu item of every menu of every menu bar item
lns3.scpt
display dialog "The 'Probe Menu Bar' script was executed, it uses UI element scripting to return a list of every menuitem
lns3.scpt
of every menu for every application currently running, to see results run it within AppleScript Editor."
lns3.scpt
tell process "TextEdit"
lns3.scpt
key down option
lns3.scpt
keystroke "e"
lns3.scpt
key up option
lns3.scpt
keystroke "e" using option down
lns3.scpt
key down shift
lns3.scpt
key up shift
lns3.scpt
key down {shift, option}
lns3.scpt
key up {shift, option}
lns3.scpt
keystroke "p" using {shift down, option down}
lns3.scpt
set current pane to pane "com.apple.preferences.users"
lns3.scpt
tell tab group 1 of window "Users & Groups" of process "System Preferences"
lns3.scpt
click radio button "Password"
lns3.scpt
set theResult to value of text field "Full name:"
lns3.scpt
activate me
lns3.scpt
display dialog "Full name: " & theResult
lns3.scpt
global screenshotPath
lns3.scpt
on isVoiceOverRunning()
lns3.scpt
set isRunning to false
lns3.scpt
set isRunning to (name of processes) contains "VoiceOver"
lns3.scpt
return isRunning
lns3.scpt
end isVoiceOverRunning
lns3.scpt
on isVoiceOverRunningWithAppleScript()
lns3.scpt
if isVoiceOverRunning() then
lns3.scpt
set isRunningWithAppleScript to true
lns3.scpt
tell application "VoiceOver"
lns3.scpt
set x to bounds of vo cursor
lns3.scpt
set isRunningWithAppleScript to false
lns3.scpt
return isRunningWithAppleScript
lns3.scpt
end isVoiceOverRunningWithAppleScript
lns3.scpt
set screenshotPath to ""
lns3.scpt
if isVoiceOverRunningWithAppleScript() then
lns3.scpt
tell vo cursor
lns3.scpt
set screenshotPath to grab screenshot
lns3.scpt
display dialog "VoiceOver must be running with AppleScript support enabled"
lns3.scpt
set newMessage to make new outgoing message with properties {visible:true, subject:"VoiceOver Cursor Screenshot", content:"VoiceOver Cursor screenshot:" & return & return}
lns3.scpt
tell newMessage
lns3.scpt
tell content
lns3.scpt
make new attachment with properties {file name:screenshotPath} at after last paragraph
lns3.scpt
on unreadMailCount()
lns3.scpt
set unreadCount to 0 as number
lns3.scpt
set unreadCount to (unread count of inbox) + unreadCount
lns3.scpt
return unreadCount
lns3.scpt
end unreadMailCount
lns3.scpt
set unreadString to ""
lns3.scpt
set unreadCount to unreadMailCount()
lns3.scpt
if unreadCount is equal to 1 then
lns3.scpt
set unreadString to unreadCount & " unread message" as string
lns3.scpt
set unreadString to unreadCount & " unread messages" as string
lns3.scpt