text
stringlengths
0
15.7k
source
stringlengths
6
112
end GetParentPath
HTTP%20Segmenter.scpt
set originalFileName to q number
Save New Version.applescript
set originalPath to path
Save New Version.applescript
set originalPathAlias to POSIX file originalPath as alias
Save New Version.applescript
set originalPath to (container of originalPathAlias) as alias
Save New Version.applescript
if originalFileName contains "-" then
Save New Version.applescript
set theResult to util's splitString(originalFileName, " - ")
Save New Version.applescript
set originalNote to item -1 of theResult
Save New Version.applescript
set originalNameAndVersion to item 1 of theResult
Save New Version.applescript
set originalNameAndVersion to originalFileName
Save New Version.applescript
set theResult to util's splitString(originalNameAndVersion, " v")
Save New Version.applescript
set projectName to item 1 of theResult
Save New Version.applescript
set originalVersion to item -1 of theResult
Save New Version.applescript
set theResult to util's splitString(originalVersion, ".")
Save New Version.applescript
set originalMajor to item 1 of theResult
Save New Version.applescript
set originalMinor to item 2 of theResult
Save New Version.applescript
set nextMajor to "v" & (originalMajor + 1) & ".0"
Save New Version.applescript
set nextMinor to "v" & originalMajor & "." & (originalMinor + 1)
Save New Version.applescript
set nextTest to "v" & originalMajor & ".t" & (originalMinor + 1)
Save New Version.applescript
set nextVersionChoices to {"Minor (" & nextMinor & ")", "Major (" & nextMajor & ")"}
Save New Version.applescript
set nextVersion to choose from list nextVersionChoices with prompt "How do you want to increment the version number?" default items {"Minor (" & nextMinor & ")"} with title (projectName & " v" & originalVersion)
Save New Version.applescript
if nextVersion is {"Minor (" & nextMinor & ")"} then
Save New Version.applescript
set versionNumber to nextMinor
Save New Version.applescript
else if nextVersion is {"Major (" & nextMajor & ")"} then
Save New Version.applescript
set versionNumber to nextMajor
Save New Version.applescript
else if nextVersion is {"Test (" & nextTest & ")"} then
Save New Version.applescript
set versionNumber to nextTest
Save New Version.applescript
set newNote to text returned of (display dialog "Would you like to set a note for this version?" with title "Version Note" default answer "")
Save New Version.applescript
set newFileName to projectName & " " & versionNumber
Save New Version.applescript
if newNote is not "" then
Save New Version.applescript
set newFileName to newFileName & " - " & newNote
Save New Version.applescript
tell application id "com.figure53.Qlab.4"
Save New Version.applescript
tell front workspace
Save New Version.applescript
save in ((originalPath as string) & (newFileName as string))
Save New Version.applescript
open ((originalPath as string) & (newFileName as string) & ".qlab4")
Save New Version.applescript
close back workspace without saving
Save New Version.applescript
global XFileBase
XFileExtend.applescript
script XFileExtend
XFileExtend.applescript
property parent : XFileBase
XFileExtend.applescript
on resolve_alias()
XFileExtend.applescript
set info_rec to info()
XFileExtend.applescript
if alias of info_rec then
XFileExtend.applescript
tell current application's class "NSURL"
XFileExtend.applescript
set a_url to its fileURLWithPath_(my _itemRef)
XFileExtend.applescript
set a_url to a_url's resolveAliasFile()
XFileExtend.applescript
set a_path to a_url's |path|() as text
XFileExtend.applescript
set original_item to (a_path as POSIX file) as alias
XFileExtend.applescript
return make_with(original_item)
XFileExtend.applescript
return a reference to me
XFileExtend.applescript
end resolve_alias
XFileExtend.applescript
return XFileExtend
XFileExtend.applescript
SFR_Escape("<:foo:=bar:>")
SFR_Escape.applescript
set escapeCharList to {"=", ":", "<", ">"}
SFR_Escape.applescript
repeat with oneChar in escapeCharList
SFR_Escape.applescript
set someString to replaceSimple({someString, oneChar, "/" & oneChar})
SFR_Escape.applescript
return someString
SFR_Escape.applescript
set str to name of theTrack
misc_song_cleanup.scpt
set str to my trimFrontChars(str, 0)
misc_song_cleanup.scpt
set str to my trimLastChars(str, 31)
misc_song_cleanup.scpt
set name of theTrack to str
misc_song_cleanup.scpt
on trimFrontChars(theStr, numChars)
misc_song_cleanup.scpt
if numChars is greater than 0 then
misc_song_cleanup.scpt
return characters numChars thru -1 of theStr as string
misc_song_cleanup.scpt
return theStr
misc_song_cleanup.scpt
end trimFrontChars
misc_song_cleanup.scpt
on trimLastChars(theStr, numChars)
misc_song_cleanup.scpt
return characters 1 thru -numChars of theStr as string
misc_song_cleanup.scpt
end trimLastChars
misc_song_cleanup.scpt
on is_installed(appname)
is_installed.applescript
tell application "Finder" to set Answer_ to exists application file ((path to applications folder as string) & appname)
is_installed.applescript
end is_installed
is_installed.applescript
display dialog "Project language file 1\nFor: SNU/2D/ProgrammingTools/IDE/AppleScript\nAbout:\nI chose to make AppleScript the project language for this project (SNU/2D/Programming Tools/IDE/AppleScript) as this is a AppleScript IDE, and AppleScript should be the official language for the project." -- a modal window wi...
PROJECT_LANG_1 copy.applescript
set window_count to count of every window
Notifications | Dismiss All.applescript
repeat with i from window_count to 1 by -1
Notifications | Dismiss All.applescript
click button 1 of window i
Notifications | Dismiss All.applescript
property N_MOVE : 100
mouseMove.applescript
property MOUSE_KEY : 8
mouseMove.applescript
on mouseMove(pars)
mouseMove.applescript
set nMove to nMove of (pars & {nMove:N_MOVE})
mouseMove.applescript
set mouseKey to mouseKey of (pars & {mouseKey:MOUSE_KEY})
mouseMove.applescript
repeat nMove times
mouseMove.applescript
keystroke mouseKey
mouseMove.applescript
end mouseMove
mouseMove.applescript
mouseMove({})
mouseMove.applescript
script DeezerPlayPause
deezer-osx-stop-music.applescript
set runningApp to processes whose bundle identifier is "com.deezer.Deezer"
deezer-osx-stop-music.applescript
tell application "Deezer" to pause
deezer-osx-stop-music.applescript
set wrap to 1.25 -- wrap is .625" * 2 - the outside area beyond the board width
HardCoverDimensions.applescript
set fold to 0.75 -- fold is .375" * 2 - on both sides of the spine, between the board and the spine
HardCoverDimensions.applescript
set bleed to 0.25 -- bleed is .125" * 2
HardCoverDimensions.applescript
display dialog "What is your width in inches: " default answer ""
HardCoverDimensions.applescript
set bwidth to text returned of result
HardCoverDimensions.applescript
set boardTotal to ((bwidth - 0.25) * 2) + wrap
HardCoverDimensions.applescript
display dialog "what is your height in inches: " default answer ""
HardCoverDimensions.applescript
set bheight to text returned of result
HardCoverDimensions.applescript
set heightTotal to (bheight + 0.25) + wrap
HardCoverDimensions.applescript
display dialog "What is your spine width (book bulk) in inches (decimal): " default answer ""
HardCoverDimensions.applescript
set swidth to text returned of result
HardCoverDimensions.applescript
set spineTotal to swidth + 0.125
HardCoverDimensions.applescript
set widthTotal to boardTotal + fold + spineTotal
HardCoverDimensions.applescript