text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set sel to selection of front browser window
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set old_fi to fixed indexing
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set fixed indexing to true
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
with timeout of 3000 seconds
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
repeat with this_track in sel
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
if class of this_track is file track and this_track's location is not missing value then
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set trackNumber to my extract_number_prefix(this_track's location)
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
if trackNumber is not "" then
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set this_track's track number to trackNumber
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
end timeout
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set fixed indexing to old_fi
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
display dialog "Done!" buttons {"Thanks"} default button 1 giving up after 4
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
to extract_number_prefix(loc)
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set trackNumber to (last item of my text_to_list(loc as Unicode text, ":"))
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set rubyScript to "print $1 if ARGV[0] =~ /^0*(\\d+)/"
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
return do shell script "ruby -e " & quoted form of rubyScript & " " & quoted form of trackNumber
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
end extract_number_prefix
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
on text_to_list(txt, delim)
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set saveD to AppleScript's text item delimiters
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set AppleScript's text item delimiters to {delim}
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set theList to every text item of txt
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
on error errStr number errNum
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
set AppleScript's text item delimiters to saveD
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
error errStr number errNum
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
return (theList)
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
end text_to_list
|
ID3%20Track%20Numbers%20from%20Filename%20Prefixes.scpt
|
if q type of eachCue is "Network" and osc message type of eachCue is custom and custom message of eachCue is not "" then
|
Toggle boolean argument of network cue.applescript
|
set theState to last character of (custom message of eachCue as string)
|
Toggle boolean argument of network cue.applescript
|
set theRest to text 1 thru -2 of (custom message of eachCue as string)
|
Toggle boolean argument of network cue.applescript
|
set theMessage to false
|
Toggle boolean argument of network cue.applescript
|
if theState is "1" then
|
Toggle boolean argument of network cue.applescript
|
set theMessage to theRest & "0"
|
Toggle boolean argument of network cue.applescript
|
else if theState is "0" then
|
Toggle boolean argument of network cue.applescript
|
set theMessage to theRest & "1"
|
Toggle boolean argument of network cue.applescript
|
if theMessage is not false then
|
Toggle boolean argument of network cue.applescript
|
set custom message of eachCue to theMessage
|
Toggle boolean argument of network cue.applescript
|
tell application "Skim"
|
Find day TTh.applescript
|
open "syllabus.pdf" --edit for your filename
|
Find day TTh.applescript
|
set theWeekday to (weekday of (current date) as string)
|
Find day TTh.applescript
|
set theDate to (current date)
|
Find day TTh.applescript
|
if theWeekday = "Monday" then
|
Find day TTh.applescript
|
set theDate to (current date) + 86400
|
Find day TTh.applescript
|
else if theWeekday = "Wednesday" then
|
Find day TTh.applescript
|
else if theWeekday = "Friday" then
|
Find day TTh.applescript
|
set theDate to (current date) + (4 * 86400)
|
Find day TTh.applescript
|
else if theWeekday = "Saturday" then
|
Find day TTh.applescript
|
set theDate to (current date) + (3 * 86400)
|
Find day TTh.applescript
|
else if theWeekday = "Sunday" then
|
Find day TTh.applescript
|
set theDate to (current date) + (2 * 86400)
|
Find day TTh.applescript
|
set searchTerm to (weekday of theDate as string) & " " & (month of theDate as string) & " " & (day of theDate as string)
|
Find day TTh.applescript
|
set theResult to find document 1 text searchTerm
|
Find day TTh.applescript
|
go document 1 to theResult
|
Find day TTh.applescript
|
return searchTerm
|
Find day TTh.applescript
|
set login_item_names to name of every login item
|
Script 20-3.applescript
|
set the_selection to choose from list login_item_names OK button name "Delete"
|
Script 20-3.applescript
|
if the_selection is not false then
|
Script 20-3.applescript
|
set selected_name to item 1 of the_selection
|
Script 20-3.applescript
|
delete login item selected_name
|
Script 20-3.applescript
|
set pathFile to selection as text
|
GoToIterm.applescript
|
set pathFile to get POSIX path of pathFile
|
GoToIterm.applescript
|
set pathFile to quoted form of pathFile
|
GoToIterm.applescript
|
set the clipboard to pathFile
|
GoToIterm.applescript
|
set isDir to (do shell script "test -d " & pathFile & " && echo true || echo false")
|
GoToIterm.applescript
|
tell application "iTerm"
|
GoToIterm.applescript
|
set nWin to (current window)
|
GoToIterm.applescript
|
tell current session of first window
|
GoToIterm.applescript
|
if isDir contains "true" then
|
GoToIterm.applescript
|
write text "cd " & pathFile
|
GoToIterm.applescript
|
else if isDir contains "false" then
|
GoToIterm.applescript
|
write text "cd $(dirname " & pathFile & ")"
|
GoToIterm.applescript
|
set the_phone_number to "(800) 555-1212"
|
Script 7-6.applescript
|
set text item delimiters to {"(", ")", "-", " "}
|
Script 7-6.applescript
|
set the_list to text items of the_phone_number
|
Script 7-6.applescript
|
set text item delimiters to ""
|
Script 7-6.applescript
|
set the_cleaned_phone_number to the_list as text
|
Script 7-6.applescript
|
set scriptPath to ((path to me as text) & "::")
|
winMoveScreenLeft.applescript
|
set windowSizeScpt to scriptPath & "windowSize.scpt"
|
winMoveScreenLeft.applescript
|
set windowSize to load script file windowSizeScpt
|
winMoveScreenLeft.applescript
|
windowSize's windowSize({direction:"LEFT", resize:0})
|
winMoveScreenLeft.applescript
|
global std
|
keyboard.applescript
|
use script "Core Text Utilities"
|
keyboard.applescript
|
use AppleScript version "2.4"
|
keyboard.applescript
|
use framework "AppKit" -- for NSEvent
|
keyboard.applescript
|
property NSControlKeyMask : a reference to 262144
|
keyboard.applescript
|
property NSAlternateKeyMask : a reference to 524288
|
keyboard.applescript
|
property NSShiftKeyMask : a reference to 131072
|
keyboard.applescript
|
property NSCommandKeyMask : a reference to 1048576
|
keyboard.applescript
|
property NSEvent : a reference to current application's NSEvent
|
keyboard.applescript
|
set caseId to "keyboard-spotCheck"
|
keyboard.applescript
|
set emoji to std's import("emoji")
|
keyboard.applescript
|
Manual Checks
|
keyboard.applescript
|
Paste Text with Emoji
|
keyboard.applescript
|
Manual: Modifier Pressed
|
keyboard.applescript
|
set spot to spotLib's new(caseId, cases)
|
keyboard.applescript
|
tell sut
|
keyboard.applescript
|
activate application "Terminal"
|
keyboard.applescript
|
delay 0.1
|
keyboard.applescript
|
pressControlKey("c")
|
keyboard.applescript
|
pressControlC()
|
keyboard.applescript
|
insertTextByPasting("Hello " & emoji's horn)
|
keyboard.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.