text
stringlengths
0
15.7k
source
stringlengths
6
112
set customNumVal to hex(customN-1)
LS9CustomFaderAssign.applescript
if chan = "x" then
LS9CustomFaderAssign.applescript
set chanNumVal to "0F 7F 7F 7F 7F"
LS9CustomFaderAssign.applescript
else if chan = "mono" or chan = "sub" then
LS9CustomFaderAssign.applescript
set chanNumVal to "00 00 00 00 62"
LS9CustomFaderAssign.applescript
else if chan = "ch" then
LS9CustomFaderAssign.applescript
set chanNumVal to "00 00 00 00 " & hex(chanN - 1)
LS9CustomFaderAssign.applescript
else if chan = "mix" then
LS9CustomFaderAssign.applescript
set chanNumVal to "00 00 00 00 " & hex(chanN + 71)
LS9CustomFaderAssign.applescript
else if chan = "mt" or chan = "mtrx" then
LS9CustomFaderAssign.applescript
set chanNumVal to "00 00 00 00 " & hex(chanN + 87)
LS9CustomFaderAssign.applescript
set msg to pre & " 02 2C 00 " & customNumVal & " 00 03 " & chanNumVal
LS9CustomFaderAssign.applescript
end faderString
LS9CustomFaderAssign.applescript
to split(someText, delimiter)
LS9CustomFaderAssign.applescript
on hex(x)
LS9CustomFaderAssign.applescript
set val to do shell script "perl -e 'printf(\"%02X\", " & x & ")'"
LS9CustomFaderAssign.applescript
return val
LS9CustomFaderAssign.applescript
end hex
LS9CustomFaderAssign.applescript
on make_file_log(file_path)
Script 19-14.applescript
script FileLog
Script 19-14.applescript
property class : "file log"
Script 19-14.applescript
property parent : make_log_base()
Script 19-14.applescript
on _write(the_text) -- Writes log messages to a UTF8-encoded text file
Script 19-14.applescript
set f to open for access file_path with write permission
Script 19-14.applescript
write (the_text & my _linefeed) to f starting at eof as «class utf8»
Script 19-14.applescript
close access f
Script 19-14.applescript
error error_message number error_number
Script 19-14.applescript
end _write
Script 19-14.applescript
end make_file_log
Script 19-14.applescript
set timeList to omnilib's getDuration(15)
duration.applescript
set hrs to first number of timeList as string
duration.applescript
set mins to second number of timeList as string
duration.applescript
display alert "Estimated Duration of Selected Tasks" message hrs & " hours and " & mins & " minutes remaining" giving up after 5
duration.applescript
on linkinuscmd(ipAddress)
qw.scpt
set iChatActive to false
qw.scpt
set theString to "/me is not currently running iChat"
qw.scpt
if (get name of every process) contains "iChat" then set iChatActive to true
qw.scpt
if iChatActive then
qw.scpt
tell application "iChat"
qw.scpt
if (length of ipAddress is 0) then
qw.scpt
set status to available
qw.scpt
set status message to ""
qw.scpt
set theString to ""
qw.scpt
set status to away
qw.scpt
set status message to "QW: " & ipAddress
qw.scpt
set theString to "/me is off to play QW (" & ipAddress & ")"
qw.scpt
end linkinuscmd
qw.scpt
linkinuscmd("")
qw.scpt
property NSPropertyListMutableContainersAndLeaves : a reference to 2
Enumerate_All_User_Login_Items.applescript
property NSData : a reference to current application's NSData
Enumerate_All_User_Login_Items.applescript
property NSPropertyListSerialization : a reference to current application's NSPropertyListSerialization
Enumerate_All_User_Login_Items.applescript
property NSArray : a reference to current application's NSArray
Enumerate_All_User_Login_Items.applescript
property NSURL : a reference to current application's NSURL
Enumerate_All_User_Login_Items.applescript
set v to AppleScript's version as number
Enumerate_All_User_Login_Items.applescript
if v is greater than 2.6 then
Enumerate_All_User_Login_Items.applescript
set logins to {}
Enumerate_All_User_Login_Items.applescript
set whoami to current application's NSUserName()
Enumerate_All_User_Login_Items.applescript
set whereami to current application's NSHomeDirectoryForUser(whoami) as text
Enumerate_All_User_Login_Items.applescript
set posixPath to whereami & "/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm"
Enumerate_All_User_Login_Items.applescript
set {theData, theError} to NSData's dataWithContentsOfFile:posixPath options:0 |error|:(reference)
Enumerate_All_User_Login_Items.applescript
if theData = missing value then error theError's localizedDescription() as text
Enumerate_All_User_Login_Items.applescript
set {newValue, theError} to NSPropertyListSerialization's propertyListWithData:theData options:NSPropertyListMutableContainersAndLeaves format:(missing value) |error|:(reference)
Enumerate_All_User_Login_Items.applescript
if newValue = missing value then error theError's localizedDescription() as text
Enumerate_All_User_Login_Items.applescript
set smg to newValue's objectForKey:"$objects"
Enumerate_All_User_Login_Items.applescript
set NSURLEnumList to NSArray's arrayWithObject:(NSString's stringWithString:"NSURLBookmarkAllPropertiesKey")
Enumerate_All_User_Login_Items.applescript
repeat with s in smg
Enumerate_All_User_Login_Items.applescript
if (s's isKindOfClass:(NSData's class)) then
Enumerate_All_User_Login_Items.applescript
set thgs to s
Enumerate_All_User_Login_Items.applescript
set thgs to (s's objectForKey:"NS.data")
Enumerate_All_User_Login_Items.applescript
if thgs is not missing value then
Enumerate_All_User_Login_Items.applescript
set prps to (NSURL's resourceValuesForKeys:NSURLEnumList fromBookmarkData:thgs)
Enumerate_All_User_Login_Items.applescript
if prps is not missing value then
Enumerate_All_User_Login_Items.applescript
set li to (prps's valueForKey:(NSURLEnumList's item 1)) as record
Enumerate_All_User_Login_Items.applescript
set end of logins to {name:li's NSURLNameKey, location:li's _NSURLPathKey}
Enumerate_All_User_Login_Items.applescript
logins
Enumerate_All_User_Login_Items.applescript
error "This script requires 10.13 or higher"
Enumerate_All_User_Login_Items.applescript
property test_block_text : "
strip_whitespace.applescript
this and
strip_whitespace.applescript
that and
strip_whitespace.applescript
asdf
strip_whitespace.applescript
on process_text(block_text)
strip_whitespace.applescript
set perl to "/usr/bin/perl -0777 -pe 's#(^[[:space:]\\xe2\\x80\\xa8]*)|([[:space:]\\xe2\\x80\\xa8])*$##g' <<<"
strip_whitespace.applescript
set result to do shell script perl & quoted form of block_text
strip_whitespace.applescript
on process text block_text
strip_whitespace.applescript
set result to process_text(block_text)
strip_whitespace.applescript
tell application "Quicksilver" to set selection to result
strip_whitespace.applescript
set result to process_text(test_block_text)
strip_whitespace.applescript
tell selected text of think window 1
_Spacing.applescript
set {line spacing, paragraph spacing, minimum line height, maximum line height} to {0.0, 0.0, 0.0, 0.0}
_Spacing.applescript
property favorite_city : "London"
Script 16-7.applescript
set all_cities to {"London", "Paris", "Moscow", "Sydney", "New York"}
Script 16-7.applescript
set the_selection to choose from list all_cities with prompt "Please pick your favorite city:" default items {favorite_city}
Script 16-7.applescript
if the_selection is false then error number -128 -- User canceled
Script 16-7.applescript
set favorite_city to item 1 of the_selection
Script 16-7.applescript
set curVal to get value of preference id "OOReturnInRowInsertsNewline"
Swap return style.scpt
set curVal2 to get value of preference id "OOReturnShouldCreateNewRow"
Swap return style.scpt
set value of preference id "OOReturnInRowInsertsNewline" to curVal2
Swap return style.scpt
set value of preference id "OOReturnShouldCreateNewRow" to curVal
Swap return style.scpt
do shell script "pbpaste -Prefer txt | pbcopy"
clipboard_to_plaintext.applescript
set theData to (the clipboard as text)
clipboard.applescript