text
stringlengths
0
15.7k
source
stringlengths
6
112
if width > maxWidth then set maxWidth to width
NSPopover.applescript
set maxHeight to maxHeight + height
NSPopover.applescript
(viewController's view's addSubview:anItem)
NSPopover.applescript
if class of padding is not list then set padding to {padding, padding} -- common width & height padding
NSPopover.applescript
viewController's view's setFrameSize:{maxWidth + (first item of padding), maxHeight + (last item of padding)}
NSPopover.applescript
return viewController
NSPopover.applescript
end makeViewController
NSPopover.applescript
to makeTextField at origin given dimensions:dimensions : {100, 22}, secure:secure : false, editable:editable : true, selectable:selectable : true, bordered:bordered : false, bezeled:bezeled : false, bezelStyle:bezelStyle : missing value, stringValue:stringValue : missing value, placeholder:placeholder : missing value, lineBreakMode:lineBreakMode : 5, textFont:textFont : missing value, textColor:textColor : missing value, backgroundColor:backgroundColor : missing value, drawsBackground:drawsBackground : true
NSPopover.applescript
set theClass to current application's NSTextField
NSPopover.applescript
if secure is true then set theClass to current application's NSSecureTextField
NSPopover.applescript
tell (theClass's alloc()'s initWithFrame:{origin, dimensions})
NSPopover.applescript
its setLineBreakMode:lineBreakMode -- 5 = NSLineBreakByTruncatingMiddle
NSPopover.applescript
if textFont is not missing value then its setFont:textFont
NSPopover.applescript
if textColor is not missing value then its setTexColor:textColor
NSPopover.applescript
if backgroundColor is not missing value then its setBackgroundColor:backgroundColor
NSPopover.applescript
if bezeled is not false then
NSPopover.applescript
its setBezeled:bezeled
NSPopover.applescript
its setBezelStyle:bezelStyle
NSPopover.applescript
if bordered is not false then its setBordered:true
NSPopover.applescript
if stringValue is not missing value then its setStringValue:stringValue
NSPopover.applescript
if placeholder is not missing value then its setPlaceholderString:placeholder
NSPopover.applescript
its setEditable:editable
NSPopover.applescript
its setSelectable:selectable
NSPopover.applescript
its setDrawsBackground:drawsBackground
NSPopover.applescript
end makeTextField
NSPopover.applescript
to makeButton at origin given dimensions:dimensions : {80, 24}, title:title : "Button", buttonType:buttonType : 7, bezelStyle:bezelStyle : 1, bordered:bordered : true, transparent:transparent : false, alternate:alternate : missing value, tag:tag : missing value, action:action : "buttonAction:", target:target : missing value
NSPopover.applescript
tell (current application's NSButton's alloc's initWithFrame:{origin, dimensions}) -- old style
NSPopover.applescript
its setTitle:(title as text)
NSPopover.applescript
its setButtonType:buttonType -- NSButtonType enum
NSPopover.applescript
if bordered is not true then its setBordered:false
NSPopover.applescript
if transparent is not false then its setTransparent:true
NSPopover.applescript
if alternate is not missing value then its setAlternateTitle:alternate
NSPopover.applescript
if tag is not missing value then its setTag:tag
NSPopover.applescript
if action is not missing value then
NSPopover.applescript
if target is missing value then set target to me -- 'me' can't be used as an optional default
NSPopover.applescript
its setTarget:target
NSPopover.applescript
its setAction:(action as text) -- see the following action handler
NSPopover.applescript
end makeButton
NSPopover.applescript
on buttonAction:sender
NSPopover.applescript
display dialog "The button '" & ((sender's title) as text) & "' was pressed." buttons {"OK"} default button 1 giving up after 2
NSPopover.applescript
end buttonAction:
NSPopover.applescript
set doc_path to file path of document 1
Images - move all to doc folder.applescript
repeat with i from 1 to count of picture boxes
Images - move all to doc folder.applescript
tell picture box i
Images - move all to doc folder.applescript
set image_path to file path of image 1 as string
Images - move all to doc folder.applescript
set image_name to name of image 1 as string
Images - move all to doc folder.applescript
beep
Images - move all to doc folder.applescript
set doc_container to (container of (doc_path))
Images - move all to doc folder.applescript
move alias image_path to folder (doc_container as string)
Images - move all to doc folder.applescript
display dialog "Done"
Images - move all to doc folder.applescript
close every window
NV-TaskPaper.applescript
key code 15 using shift down & command down
NV-TaskPaper.applescript
set TaskP to selection as text
NV-TaskPaper.applescript
set TaskP to quoted form of POSIX path of TaskP
NV-TaskPaper.applescript
tell application "TaskPaper"
NV-TaskPaper.applescript
do shell script "open -a 'TaskPaper' " & TaskP
NV-TaskPaper.applescript
keystroke "v" using {command down} -- Past Text from clipboard
Past-From-clipboard.scpt
keystroke "m" using {command down} -- Minimize window
Past-From-clipboard.scpt
on run --for Dialog
open%20maps%20by%20url%20scheme.scpt
display dialog "出発地と目的地をスペースで区切って入力" default answer "" buttons {"OK"} default button 1
open%20maps%20by%20url%20scheme.scpt
set theText to text returned of result
open%20maps%20by%20url%20scheme.scpt
openMaps(theText)
open%20maps%20by%20url%20scheme.scpt
on handle_string(theText) --for LaunchBar
open%20maps%20by%20url%20scheme.scpt
on openMaps(theText)
open%20maps%20by%20url%20scheme.scpt
set theList to makeList(theText, " ")
open%20maps%20by%20url%20scheme.scpt
set saddrText to item 1 of theList
open%20maps%20by%20url%20scheme.scpt
set daddrText to item 2 of theList
open%20maps%20by%20url%20scheme.scpt
do shell script "open 'http://maps.apple.com/?saddr=" & saddrText & "&daddr=" & daddrText & "'"
open%20maps%20by%20url%20scheme.scpt
end openMaps
open%20maps%20by%20url%20scheme.scpt
on makeList(theText, theDelimiter)
open%20maps%20by%20url%20scheme.scpt
set tmp to AppleScript's text item delimiters
open%20maps%20by%20url%20scheme.scpt
set theList to every text item of theText
open%20maps%20by%20url%20scheme.scpt
set AppleScript's text item delimiters to tmp
open%20maps%20by%20url%20scheme.scpt
return theList
open%20maps%20by%20url%20scheme.scpt
end makeList
open%20maps%20by%20url%20scheme.scpt
if (count of windows) > 0 then
iTerm.applescript
set thePath to target of front window
iTerm.applescript
display dialog "There are no open Finder windows." with icon caution buttons {"OK"} with title "Open iTerm Here..."
iTerm.applescript
if not (exists thePath) then
iTerm.applescript
tell application "Finder" to set theName to name of front window
iTerm.applescript
display dialog "The location of the Finder window \"" & theName & "\" is not a real location (e.g. smart folder, search, network, trash, etc) and cannot opened in iTerm." with icon caution buttons {"OK"} with title "Open iTerm Here..."
iTerm.applescript
set thePath to quoted form of POSIX path of (thePath as alias)
iTerm.applescript
set createdWindow to false
iTerm.applescript
if it is running then
iTerm.applescript
if (count windows) is 0 then
iTerm.applescript
create window with default profile
iTerm.applescript
set createdWindow to true
iTerm.applescript
if not createdWindow then
iTerm.applescript
tell current window
iTerm.applescript
create tab with default profile
iTerm.applescript
launch session
iTerm.applescript
tell the last session
iTerm.applescript
write text "cd " & thePath & " && clear"
iTerm.applescript
on GrowlNotify(message)
gistfile1 copy 3.scpt
tell application "Growl"
gistfile1 copy 3.scpt
register as application "Movie Barcode Random Desktop" all notifications {"Desktop Change"} default notifications {"Desktop Change"} icon of application "Script Editor"
gistfile1 copy 3.scpt
notify with name "Desktop Change" title "Desktop Change" description message application name "Movie Barcode Random Desktop"
gistfile1 copy 3.scpt
end GrowlNotify
gistfile1 copy 3.scpt
set tempList to every text item of theText
gistfile1 copy 3.scpt
set theText to the tempList as string
gistfile1 copy 3.scpt