text
stringlengths
0
15.7k
source
stringlengths
6
112
if quarterGroup is missing value or (type of quarterGroup is not group) then
DEVONthink-date.scpt
set quarterGroup to create location quarterLabel
DEVONthink-date.scpt
set weekLabel to (wk as text)
DEVONthink-date.scpt
set target to (quarterLabel & "/" & weekLabel)
DEVONthink-date.scpt
set weekGroup to get record at (target)
DEVONthink-date.scpt
if weekGroup is missing value or (type of weekGroup is not group) then
DEVONthink-date.scpt
set _pathName to (app_support & "DEVONthink 3:Templates.noindex:@LB.dtTemplate:English.lproj:Weekly Results.html")
DEVONthink-date.scpt
set weekGroup to create record with {name:weekLabel, type:group} in quarterGroup
DEVONthink-date.scpt
set _thePlaceHolders to {|YYYYW|:weekLabel}
DEVONthink-date.scpt
set newRecord to import _pathName placeholders _thePlaceHolders to weekGroup
DEVONthink-date.scpt
set name of newRecord to "Weekly Results - " & weekLabel
DEVONthink-date.scpt
set dayLabel to (dt as text)
DEVONthink-date.scpt
set target to (quarterLabel & "/" & weekLabel & "/" & dayLabel)
DEVONthink-date.scpt
set dayGroup to get record at (target)
DEVONthink-date.scpt
if dayGroup is missing value or (type of dayGroup is not group) then
DEVONthink-date.scpt
set dayString to (ds as text)
DEVONthink-date.scpt
set _pathName to (app_support & "DEVONthink 3:Templates.noindex:@LB.dtTemplate:English.lproj:Daily Results.html")
DEVONthink-date.scpt
set dayGroup to create record with {name:dayLabel, type:group} in weekGroup
DEVONthink-date.scpt
set _thePlaceHolders to {|YYYY-MM-DD|:dayString}
DEVONthink-date.scpt
set newRecord to import _pathName placeholders _thePlaceHolders to dayGroup
DEVONthink-date.scpt
set name of newRecord to "Daily Results - " & dayString
DEVONthink-date.scpt
set _path to (path of sites folder) as string
Sites.applescript
set _finderLib to load script alias ((path to home folder as text) & "Library:Script Libraries:" & "AppleScript_finderLib.scpt")
Quick_Start_File.applescript
tell _finderLib
Quick_Start_File.applescript
set _items to getSelection()
Quick_Start_File.applescript
set _files to getOnlyFiles(_items)
Quick_Start_File.applescript
set _folders to getOnlyFolders(_items)
Quick_Start_File.applescript
set _item to getFirstItem(_items)
Quick_Start_File.applescript
set _names to getNames(_items)
Quick_Start_File.applescript
set _basenames to getBasenames(_items)
Quick_Start_File.applescript
set _firstItemBasename to getBasenameOfFirstItem(_items)
Quick_Start_File.applescript
set _basenamesFiles to getBasenamesOfOnlyFiles(_items)
Quick_Start_File.applescript
set _extensions to getExtensions(_items)
Quick_Start_File.applescript
set _extensionsFiles to getExtensionsOfOnlyFiles(_items)
Quick_Start_File.applescript
set _extensionsToggled to toggleExtensionsHidden(_items)
Quick_Start_File.applescript
set _paths to getPosixPaths(_items)
Quick_Start_File.applescript
set _pathsQ to getPosixPathsQ(_items)
Quick_Start_File.applescript
set _pathsShell to getEscapedPosixArray(_items)
Quick_Start_File.applescript
set _pathsHFS to getHFSPaths(_items)
Quick_Start_File.applescript
set _pathsHFSQ to getHFSPathsQ(_items)
Quick_Start_File.applescript
set _pathsParent to getParentPosix(_items)
Quick_Start_File.applescript
set _pathsParentHFS to getParentHFS(_items)
Quick_Start_File.applescript
set _basename to getBasenameOfItem(_item)
Quick_Start_File.applescript
set _name_ext to getNameAndExt(_item)
Quick_Start_File.applescript
set _comment to getCommentOfItem(_item)
Quick_Start_File.applescript
set _parent to getContainerOfItem(_item)
Quick_Start_File.applescript
set _properties to getPropertiesOfItem(_item)
Quick_Start_File.applescript
set _parentAlias to getParentAlias(_alias)
Quick_Start_File.applescript
set _conjuredPaths to appendBasenamesToParentPOSIX(_basenames, _pathParent)
Quick_Start_File.applescript
windowResize's windowResize(0, 1)
windowResizeHeightPlus.applescript
set thisFolder to (container of (path to me)) as string
Example.applescript
if "Pashua:Pashua.app:" exists then
Example.applescript
set customLocation to "Pashua:"
Example.applescript
set customLocation to ""
Example.applescript
set thePath to alias (thisFolder & "Pashua.scpt")
Example.applescript
set pashuaBinding to load script thePath
Example.applescript
tell pashuaBinding
Example.applescript
set pashuaLocation to getPashuaPath(customLocation)
Example.applescript
set dialogConfiguration to my getDialogConfiguration(pashuaLocation)
Example.applescript
set theResult to showDialog(dialogConfiguration, customLocation)
Example.applescript
if {} = theResult then
Example.applescript
display alert "Empty return value" message "It looks like Pashua had some problems using the window configuration." as warning
Example.applescript
else if cb of theResult is not "1" then
Example.applescript
display dialog "AppleScript received this record: " & return & return & ¬
Example.applescript
"pop: " & pop of theResult & return & ¬
Example.applescript
"ob: " & ob of theResult & return & ¬
Example.applescript
"tf: " & tf of theResult & return & ¬
Example.applescript
"chk: " & chk of theResult & return & ¬
Example.applescript
"rb: " & rb of theResult & return
Example.applescript
display dialog "The dialog was closed without submitting the values"
Example.applescript
display alert "An error occurred" message errorMessage as warning
Example.applescript
display dialog errStr
Example.applescript
on getDialogConfiguration(pashuaLocation)
Example.applescript
if pashuaLocation is not "" then
Example.applescript
set img to "img.type = image
Example.applescript
img.x = 435
Example.applescript
img.y = 248
Example.applescript
img.maxwidth = 128
Example.applescript
img.tooltip = This is an element of type “image”
Example.applescript
img.path = " & (POSIX path of pashuaLocation) & "/Contents/Resources/[email protected]" & return
Example.applescript
set img to ""
Example.applescript
return "
Example.applescript
*.title = Welcome to Pashua
Example.applescript
txt.type = text
Example.applescript
txt.default = Pashua is an application for generating dialog windows from programming languages which lack support for creating native GUIs on Mac OS X. Any information you enter in this example window will be returned to the calling script when you hit “OK”; if you decide to click “Cancel” or press “Esc” instead, no values will be returned.[return][return]This window shows nine of the UI element types that are available. You can find a full list of all GUI elements and their corresponding attributes in the documentation (➔ Help menu) that is included with Pashua.
Example.applescript
txt.height = 276
Example.applescript
txt.width = 310
Example.applescript
txt.x = 340
Example.applescript
txt.y = 44
Example.applescript
txt.tooltip = This is an element of type “text”
Example.applescript
tf.type = textfield
Example.applescript
tf.label = Example textfield
Example.applescript
tf.default = Textfield content
Example.applescript
tf.width = 310
Example.applescript
tf.tooltip = This is an element of type “textfield”
Example.applescript
ob.type = openbrowser
Example.applescript
ob.label = Example filesystem browser (textfield + open panel)
Example.applescript
ob.width=310
Example.applescript
ob.tooltip = This is an element of type “openbrowser”
Example.applescript
rb.type = radiobutton
Example.applescript