text
stringlengths
0
15.7k
source
stringlengths
6
112
return filePath
expandTildeInPath.applescript
end expandTildeInPath
expandTildeInPath.applescript
set choices to {"app1"}
start-dev.applescript
choose from list choices with title "Start" with prompt "What do you want to develop?" default items (get item 1 in choices)
start-dev.applescript
set choice to result
start-dev.applescript
if choice is false then
start-dev.applescript
if choice as string is equal to "app1" then
start-dev.applescript
do script "nvm use 4.4.6" in tab 1 of front window
start-dev.applescript
do script "cd code/app1/server" in tab 1 of front window
start-dev.applescript
do script "npm run start" in tab 1 of front window
start-dev.applescript
do script "nvm use 4.4.6" in tab 2 of front window
start-dev.applescript
do script "cd code/app1/client" in tab 2 of front window
start-dev.applescript
do script "npm run dev-data" in tab 2 of front window
start-dev.applescript
do script "nvm use 4.4.6" in tab 3 of front window
start-dev.applescript
do script "cd code/app1/client" in tab 3 of front window
start-dev.applescript
do script "npm run start" in tab 3 of front window
start-dev.applescript
property scpt_front : "
_ui-helpers.applescript
tell application (path to frontmost application as text)
_ui-helpers.applescript
property scpt_middle : "
_ui-helpers.applescript
if not (errNum is equal to -128) then
_ui-helpers.applescript
tell application id \"sevs\"
_ui-helpers.applescript
property scpt_end : "
_ui-helpers.applescript
on display_dialog(rec)
_ui-helpers.applescript
set scpt to "display dialog \"" & (z_text of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "default answer \"" & (z_answer of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "hidden answer " & (z_hidden of rec)
_ui-helpers.applescript
set b to my stringify_list(z_buttons of rec)
_ui-helpers.applescript
set scpt to scpt & space & "buttons " & b
_ui-helpers.applescript
if class of z_ok of rec = text then
_ui-helpers.applescript
set scpt to scpt & space & "default button \"" & (z_ok of rec) & "\""
_ui-helpers.applescript
else if class of z_ok of rec = integer then
_ui-helpers.applescript
set scpt to scpt & space & "default button " & (z_ok of rec)
_ui-helpers.applescript
if class of z_cancel of rec = text then
_ui-helpers.applescript
set scpt to scpt & space & "cancel button \"" & (z_cancel of rec) & "\""
_ui-helpers.applescript
else if class of z_cancel of rec = integer then
_ui-helpers.applescript
set scpt to scpt & space & "cancel button " & (z_cancel of rec)
_ui-helpers.applescript
set scpt to scpt & space & "with title \"" & (z_title of rec) & "\""
_ui-helpers.applescript
if (z_icon of rec) contains "/" then
_ui-helpers.applescript
set icon_ to "POSIX file \"" & (z_icon of rec) & "\" as alias"
_ui-helpers.applescript
run script icon_
_ui-helpers.applescript
set scpt to scpt & space & "with icon " & (icon_)
_ui-helpers.applescript
else if (z_icon of rec) contains ":" then
_ui-helpers.applescript
set icon_ to "\"" & (z_icon of rec) & "\" as alias"
_ui-helpers.applescript
set icon_ to (z_icon of rec)
_ui-helpers.applescript
set scpt to scpt & space & "giving up after " & (z_wait of rec)
_ui-helpers.applescript
run script scpt_front & scpt & scpt_middle & scpt & scpt_end
_ui-helpers.applescript
end display_dialog
_ui-helpers.applescript
on choose_from_list(rec)
_ui-helpers.applescript
set l to my stringify_list(z_list of rec)
_ui-helpers.applescript
set scpt to "choose from list " & l
_ui-helpers.applescript
set scpt to scpt & space & "with prompt \"" & (z_prompt of rec) & "\""
_ui-helpers.applescript
if class of z_def of rec = list then
_ui-helpers.applescript
set l to my stringify_list(z_def of rec)
_ui-helpers.applescript
set scpt to scpt & space & "default items " & l
_ui-helpers.applescript
else if class of z_def of rec = text then
_ui-helpers.applescript
set scpt to scpt & space & "default items {\"" & (z_def of rec) & "\"}"
_ui-helpers.applescript
else if class of z_def of rec = integer then
_ui-helpers.applescript
set scpt to scpt & space & "default items item " & (z_def of rec) & "of " & l
_ui-helpers.applescript
set scpt to scpt & space & "OK button name \"" & (z_ok of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "cancel button name \"" & (z_cancel of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "multiple selections allowed " & (z_multiple of rec)
_ui-helpers.applescript
set scpt to scpt & space & "empty selection allowed " & (z_empty of rec)
_ui-helpers.applescript
end choose_from_list
_ui-helpers.applescript
on choose_file(rec)
_ui-helpers.applescript
set scpt to "choose file"
_ui-helpers.applescript
set l to my stringify_list(z_types of rec)
_ui-helpers.applescript
set scpt to scpt & space & "of type " & l
_ui-helpers.applescript
if (z_def of rec) contains "/" then
_ui-helpers.applescript
set def_ to "POSIX file \"" & (z_def of rec) & "\" as alias"
_ui-helpers.applescript
run script def_
_ui-helpers.applescript
set scpt to scpt & space & "default location " & (def_)
_ui-helpers.applescript
else if (z_def of rec) contains ":" then
_ui-helpers.applescript
set def_ to "\"" & (z_def of rec) & "\" as alias"
_ui-helpers.applescript
else if (z_def of rec) is "" then
_ui-helpers.applescript
set def_ to (z_def of rec)
_ui-helpers.applescript
set scpt to scpt & space & "invisibles " & (z_invisibles of rec)
_ui-helpers.applescript
set scpt to scpt & space & "showing package contents " & (z_package of rec)
_ui-helpers.applescript
set res to (run script scpt_front & scpt & scpt_middle & scpt & scpt_end)
_ui-helpers.applescript
if (count of res) > 1 then
_ui-helpers.applescript
repeat with i from 1 to count of res
_ui-helpers.applescript
copy (POSIX path of (item i of res)) to end of l
_ui-helpers.applescript
return POSIX path of res
_ui-helpers.applescript
on display_notification(rec)
_ui-helpers.applescript
set scpt to "display notification \"" & (z_notification of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "subtitle \"" & (z_subtitle of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "sound name \"" & (z_sound of rec) & "\""
_ui-helpers.applescript
end display_notification
_ui-helpers.applescript
on choose_folder(rec)
_ui-helpers.applescript
set scpt to "choose folder"
_ui-helpers.applescript
end choose_folder
_ui-helpers.applescript
on display_alert(rec)
_ui-helpers.applescript
set scpt to "display alert \"" & (z_display of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "message \"" & (z_message of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "as " & (z_as of rec)
_ui-helpers.applescript
set l to my stringify_list(z_buttons of rec)
_ui-helpers.applescript
set scpt to scpt & space & "buttons " & l
_ui-helpers.applescript
end display_alert
_ui-helpers.applescript
on say_text(rec)
_ui-helpers.applescript
set scpt to "say \"" & (z_say of rec) & "\""
_ui-helpers.applescript
set scpt to scpt & space & "displaying \"" & (z_display of rec) & "\""
_ui-helpers.applescript