Skip to content

Instantly share code, notes, and snippets.

@midore
midore / gist:61329
Created February 10, 2009 09:40
applescript, dialog-lib <http://gist.github.com/61328>
script call_scp
on load_lib_file(f)
# load "dialog.scpt" as object
load script (alias f)
end load_lib_file
on path_lib_dialog()
# path to "dialog.scpt" of current directory
tell application "Finder"
set pstr to (path to me) as alias
@midore
midore / gist:61328
Created February 10, 2009 09:39
dialog-lib, call.applescript:<http://gist.github.com/61329>
script scp_dialog
on cased given mytitle:t, message:m, button:b, myicon:i, givefter:g, type:type, ans:a, mylist:l
if type is "default" then default(t, m, b)
if type is "default_withicon" then default_withicon(t, m, b, i)
if type is "giveafter" then giveafter(t, m, b, i, g)
if type is "inputtext" then inputtext(t, m, b, a)
if type is "chooselist" then chooselist(t, m, l)
end cased