text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set copyMenuItem to menu item "Copy" of menu 1 of menu bar item "Edit" of menu bar 1
|
fmGUI_MenuItemAvailable.applescript
|
fmGUI_MenuItemAvailable({menuItemRef:copyMenuItem})
|
fmGUI_MenuItemAvailable.applescript
|
on fmGUI_MenuItemAvailable(prefs)
|
fmGUI_MenuItemAvailable.applescript
|
set defaultPrefs to {menuItemRef:null, maxTimeoutSec:60, checkFrequencySec:0.5}
|
fmGUI_MenuItemAvailable.applescript
|
set menuItemRef to ensureObjectRef(menuItemRef of prefs)
|
fmGUI_MenuItemAvailable.applescript
|
if menuItemRef is null then error "menuItemRef not specified" number -1024
|
fmGUI_MenuItemAvailable.applescript
|
return exists menuItemRef
|
fmGUI_MenuItemAvailable.applescript
|
error "Couldn't fmGUI_MenuItemAvailable - " & errMsg number errNum
|
fmGUI_MenuItemAvailable.applescript
|
end fmGUI_MenuItemAvailable
|
fmGUI_MenuItemAvailable.applescript
|
on ensureObjectRef(someObjectRef)
|
fmGUI_MenuItemAvailable.applescript
|
tell application "Finder" to set ensureObjPath to (container of (container of (path to me)) as text) & "text parsing:ensureObjectRef.applescript"
|
fmGUI_MenuItemAvailable.applescript
|
set codeEnsureObj to read file ensureObjPath as text
|
fmGUI_MenuItemAvailable.applescript
|
tell application "htcLib" to set codeEnsureObj to "script codeEnsureObj " & return & getTextBetween({sourceText:codeEnsureObj, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeEnsureObj"
|
fmGUI_MenuItemAvailable.applescript
|
set codeEnsureObj to run script codeEnsureObj
|
fmGUI_MenuItemAvailable.applescript
|
tell codeEnsureObj to ensureObjectRef(someObjectRef)
|
fmGUI_MenuItemAvailable.applescript
|
end ensureObjectRef
|
fmGUI_MenuItemAvailable.applescript
|
set the sound volume to 0
|
spotify_play_wakeup.scpt
|
play track "spotify:track:TRACKURI" in context "spotify:user:USERNAME:playlist:PLAYLISTURI"
|
spotify_play_wakeup.scpt
|
delay FIRSTTRACKDURATIONINSECONDS
|
spotify_play_wakeup.scpt
|
repeat 10 times
|
spotify_play_wakeup.scpt
|
if sound volume is less than 50 then
|
spotify_play_wakeup.scpt
|
set sound volume to (sound volume + 10)
|
spotify_play_wakeup.scpt
|
delay 3
|
spotify_play_wakeup.scpt
|
use script "Dialog Toolkit Plus" --version "1.1.0"
|
Edit-Last-Expanded-Rule.applescript
|
tell application "Typinator"
|
Edit-Last-Expanded-Rule.applescript
|
set lastexp to value of variable "Typinator_abbreviation"
|
Edit-Last-Expanded-Rule.applescript
|
set theSet to value of variable "Typinator_set"
|
Edit-Last-Expanded-Rule.applescript
|
set lastrule to first rule of rule set theSet whose abbreviation is lastexp
|
Edit-Last-Expanded-Rule.applescript
|
tell lastrule
|
Edit-Last-Expanded-Rule.applescript
|
set snip to plain expansion
|
Edit-Last-Expanded-Rule.applescript
|
set abbreve to abbreviation
|
Edit-Last-Expanded-Rule.applescript
|
set descrip to description
|
Edit-Last-Expanded-Rule.applescript
|
set uid to unique id
|
Edit-Last-Expanded-Rule.applescript
|
set containerid to unique id of containing set
|
Edit-Last-Expanded-Rule.applescript
|
set theLabelStrings to {"Abbreviation", "Snippet:", "Description:"}
|
Edit-Last-Expanded-Rule.applescript
|
set maxLabelWidth to max width for labels theLabelStrings
|
Edit-Last-Expanded-Rule.applescript
|
set controlLeft to maxLabelWidth + 8
|
Edit-Last-Expanded-Rule.applescript
|
set theTop to 0
|
Edit-Last-Expanded-Rule.applescript
|
set {theRule, theTop} to create rule (theTop + 12) rule width 400
|
Edit-Last-Expanded-Rule.applescript
|
set {descripField, descripLabel, theTop, fieldLeft} to create side labeled field (descrip) placeholder text descrip left inset 0 bottom (theTop + 8) total width 400 label text (item 3 of theLabelStrings) field left controlLeft
|
Edit-Last-Expanded-Rule.applescript
|
set {snipField, snipLabel, theTop, fieldLeft} to create side labeled field (snip) placeholder text snip left inset 0 bottom (theTop + 8) total width 400 label text (item 2 of theLabelStrings) field left controlLeft
|
Edit-Last-Expanded-Rule.applescript
|
set {abbreveField, abbreveLabel, theTop, fieldLeft} to create side labeled field (abbreve) placeholder text abbreve left inset 0 bottom (theTop + 8) total width 400 label text (item 1 of theLabelStrings) field left controlLeft
|
Edit-Last-Expanded-Rule.applescript
|
set allControls to {theRule, descripField, descripLabel, snipField, snipLabel, abbreveField, abbreveLabel}
|
Edit-Last-Expanded-Rule.applescript
|
set {buttonName, suppressedState, controlResults} to display enhanced alert "Edit Last Typinator Rule" message "Use this window to edit directly, or click Show to see the snippet in Typinator" as informational alert buttons {"Cancel", "Show", "OK"} giving up after 120 acc view width 400 acc view height theTop acc view controls allControls without suppression
|
Edit-Last-Expanded-Rule.applescript
|
set {unused, descrip, unused, snip, unused, abbreve} to controlResults
|
Edit-Last-Expanded-Rule.applescript
|
if buttonName = "OK" then
|
Edit-Last-Expanded-Rule.applescript
|
set c to first rule set whose unique id is containerid
|
Edit-Last-Expanded-Rule.applescript
|
tell c
|
Edit-Last-Expanded-Rule.applescript
|
set r to first rule whose unique id is uid
|
Edit-Last-Expanded-Rule.applescript
|
tell r
|
Edit-Last-Expanded-Rule.applescript
|
set abbreviation to abbreve
|
Edit-Last-Expanded-Rule.applescript
|
set description to descrip
|
Edit-Last-Expanded-Rule.applescript
|
set plain expansion to snip
|
Edit-Last-Expanded-Rule.applescript
|
if errNum = -1719 then
|
Edit-Last-Expanded-Rule.applescript
|
display notification "No unique id found" with title "Edit Snippet" subtitle "Error:" sound name "Basso"
|
Edit-Last-Expanded-Rule.applescript
|
else if buttonName = "Show" then
|
Edit-Last-Expanded-Rule.applescript
|
tell application "Typinator" to quick search "last"
|
Edit-Last-Expanded-Rule.applescript
|
tell application "System Events" to keystroke return using {command down}
|
Edit-Last-Expanded-Rule.applescript
|
tell application "Pages"
|
Script 24-3.applescript
|
tell every section of document 1
|
Script 24-3.applescript
|
set different first page to true
|
Script 24-3.applescript
|
set different left and right pages to true
|
Script 24-3.applescript
|
set odd header to "iWork '09"
|
Script 24-3.applescript
|
set even header to "Pages Features"
|
Script 24-3.applescript
|
set odd footer to "http://www.apple.com/iwork/pages/"
|
Script 24-3.applescript
|
set even footer to "(c) Apple Inc., 2010"
|
Script 24-3.applescript
|
set alignment of odd footer to left
|
Script 24-3.applescript
|
set alignment of even footer to right
|
Script 24-3.applescript
|
set values_list to {}
|
cells_sequence.applescript
|
tell application "Microsoft Excel"
|
cells_sequence.applescript
|
log ("" & (count of rows of selection as integer) & " rows")
|
cells_sequence.applescript
|
log ("" & (count of columns of selection as integer) & " columns")
|
cells_sequence.applescript
|
log "-------------"
|
cells_sequence.applescript
|
repeat with j from 1 to count of columns of selection
|
cells_sequence.applescript
|
set d to cell j of row 1 of selection
|
cells_sequence.applescript
|
set v to value of d
|
cells_sequence.applescript
|
log v
|
cells_sequence.applescript
|
repeat with j from (count of columns of selection as integer + 1) to count large of selection
|
cells_sequence.applescript
|
set d to cell j of selection
|
cells_sequence.applescript
|
set values_list to values_list & v
|
cells_sequence.applescript
|
global theImagesFolder
|
021_Challenge_1_my_answer.applescript
|
set hasPS to get exists folder ((path to applications folder as string) & "Adobe Photoshop CS6")
|
021_Challenge_1_my_answer.applescript
|
set theImagesFolder to ((path to desktop folder) & "Images" as string as alias)
|
021_Challenge_1_my_answer.applescript
|
set theImages to the name of every file of theImagesFolder
|
021_Challenge_1_my_answer.applescript
|
display dialog "Fill in copyright to add to images" default answer "Copyright (c) 2015 All Rights Reserved" with title "Copyright text" with icon note buttons {"Ok", "Cancel"} default button 1
|
021_Challenge_1_my_answer.applescript
|
set textResponse to text returned of result
|
021_Challenge_1_my_answer.applescript
|
on addComment(theImage, textResponse)
|
021_Challenge_1_my_answer.applescript
|
set theFile to (theImagesFolder & theImage) as string as alias
|
021_Challenge_1_my_answer.applescript
|
set comment of theFile to textResponse
|
021_Challenge_1_my_answer.applescript
|
end addComment
|
021_Challenge_1_my_answer.applescript
|
on addWatermark(theImage)
|
021_Challenge_1_my_answer.applescript
|
end addWatermark
|
021_Challenge_1_my_answer.applescript
|
if hasPS is false then
|
021_Challenge_1_my_answer.applescript
|
repeat with anImage in theImages
|
021_Challenge_1_my_answer.applescript
|
addComment(anImage, textResponse)
|
021_Challenge_1_my_answer.applescript
|
addWatermark(anImage)
|
021_Challenge_1_my_answer.applescript
|
on simple_sort(my_list)
|
SortText.scpt
|
set the index_list to {}
|
SortText.scpt
|
set the sorted_list to {}
|
SortText.scpt
|
repeat (the number of items in my_list) times
|
SortText.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.