text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
on GetMasterPath(aStr) | Aperture-Update-EXIF-GPS.scpt |
set aYear to text item 1 of aStr | Aperture-Update-EXIF-GPS.scpt |
set aMonth to text item 2 of aStr | Aperture-Update-EXIF-GPS.scpt |
set aRest to text item 3 of aStr | Aperture-Update-EXIF-GPS.scpt |
set AppleScript's text item delimiters to " @ " | Aperture-Update-EXIF-GPS.scpt |
set aDay to text item 1 of aRest | Aperture-Update-EXIF-GPS.scpt |
set aRest to text item 2 of aRest | Aperture-Update-EXIF-GPS.scpt |
set anHour to text item 1 of aRest | Aperture-Update-EXIF-GPS.scpt |
set aMinute to text item 2 of aRest | Aperture-Update-EXIF-GPS.scpt |
set aRest to text item 3 of aRest | Aperture-Update-EXIF-GPS.scpt |
set aSecond to text item 1 of aRest | Aperture-Update-EXIF-GPS.scpt |
set AmPm to text item 2 of aRest | Aperture-Update-EXIF-GPS.scpt |
if AmPm is equal to "PM" then | Aperture-Update-EXIF-GPS.scpt |
set anHour to anHour + 12 | Aperture-Update-EXIF-GPS.scpt |
set aRest to {"", "Masters", aYear, aMonth, aDay, aYear & aMonth & aDay & "-" & anHour & aMinute & aSecond, ""} as text | Aperture-Update-EXIF-GPS.scpt |
return aRest | Aperture-Update-EXIF-GPS.scpt |
end GetMasterPath | Aperture-Update-EXIF-GPS.scpt |
on getLibPath() | Aperture-Update-EXIF-GPS.scpt |
tell application "System Events" to set p_libPath to value of property list item "LibraryPath" of property list file ((path to preferences as Unicode text) & "com.apple.aperture.plist") | Aperture-Update-EXIF-GPS.scpt |
if ((offset of "~" in p_libPath) is not 0) then | Aperture-Update-EXIF-GPS.scpt |
set p_script to "/bin/echo $HOME" | Aperture-Update-EXIF-GPS.scpt |
set p_homePath to (do shell script p_script) | Aperture-Update-EXIF-GPS.scpt |
set p_offset to offset of "~" in p_libPath | Aperture-Update-EXIF-GPS.scpt |
set p_path to text (p_offset + 1) thru -1 of p_libPath | Aperture-Update-EXIF-GPS.scpt |
set g_libPath to p_homePath & p_path | Aperture-Update-EXIF-GPS.scpt |
return g_libPath | Aperture-Update-EXIF-GPS.scpt |
return p_libPath | Aperture-Update-EXIF-GPS.scpt |
end getLibPath | Aperture-Update-EXIF-GPS.scpt |
on formatText(aStr, aDelimiter) | Aperture-Update-EXIF-GPS.scpt |
set theArray to every text item of aStr | Aperture-Update-EXIF-GPS.scpt |
end formatText | Aperture-Update-EXIF-GPS.scpt |
tell application "Firefox Developer Edition" | firefox-dev-new-cmd-shift-m.applescript |
open ":" | firefox-dev-new-cmd-shift-m.applescript |
tell menu 1 of menu item "New Container Tab" of menu 1 of menu bar item "File" of menu bar 1 | firefox-dev-new-cmd-shift-m.applescript |
key code 48 using {control down} | firefox-dev-new-cmd-shift-m.applescript |
return listOfChromeTabs() | returnListOfChromeTabs.applescript |
on listOfChromeTabs() | returnListOfChromeTabs.applescript |
set urlText to "" | returnListOfChromeTabs.applescript |
set tabName to title of tab y of window x | returnListOfChromeTabs.applescript |
set urlText to urlText & tabURL & linefeed | returnListOfChromeTabs.applescript |
set docText to docText & "\"" & tabURL & "\"" & linefeed as string | returnListOfChromeTabs.applescript |
return docText | returnListOfChromeTabs.applescript |
end listOfChromeTabs | returnListOfChromeTabs.applescript |
if (count of these_items) is greater than 1 then set the selection of think window 1 to {this_item} | Speak Comments.applescript |
if this_comment is not "" then say (this_comment as string) | Speak Comments.applescript |
set checkSum to the text returned of (display dialog "Paste SHA256" default answer "" with title fileName) | sha256.applescript |
set checkSumResult to first word of (do shell script "/usr/bin/openssl dgst -sha256 " & quoted form of POSIX path of chosenFile & " | awk '{print $2}'") | sha256.applescript |
display dialog displayText & "SHA256 OK!" buttons {"OK"} default button "OK" with title fileName | sha256.applescript |
display dialog displayText & "NB! No SHA256 match!" buttons {"CANCEL"} default button "CANCEL" with title fileName with icon caution | sha256.applescript |
set white_list to {"Finder"} | kill-all.scpt |
tell application this_process | kill-all.scpt |
tell the current application to display dialog "An error has occurred!" & return & "This script will now quit" buttons {"Quit"} default button 1 with icon 0 | kill-all.scpt |
set properties to {alignment:left, font:"Courier", size:11, color:{60000, 0, 0}, background:{65535, 65535, 65535}} | Source.applescript |
plain | Source.applescript |
set terminalapp to "iTerm" | rsatoken.scpt |
set pin to "6666" | rsatoken.scpt |
tell application "SecurID" | rsatoken.scpt |
tell application terminalapp | rsatoken.scpt |
keystroke pin | rsatoken.scpt |
fmGUI_CustomMenus_MenuSet_CreateUpdate({}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
on fmGUI_CustomMenus_MenuSet_CreateUpdate(prefs) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set defaultPrefs to {menuSetRec:null} | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuSetRec to menuSetRec of prefs | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set createButton to first button of tab group 1 of window 1 whose name starts with "Create" | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set editButton to first button of tab group 1 of window 1 whose name starts with "Edit" | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set duplicateButton to first button of tab group 1 of window 1 whose name starts with "Duplicate" | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuSetAlreadyExists to fmGUI_CustomMenus_MenuSet_Select({menuSetName:menuSetName of menuSetRec}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuSetToDupeFromExisting to fmGUI_CustomMenus_MenuSet_Select({menuSetName:dupeExisting of menuSetRec}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuSetToDupeFromExisting to false | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
if menuSetAlreadyExists then | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
fmGUI_ObjectClick_Button({buttonRef:editButton}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
else if menuSetToDupeFromExisting then | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
fmGUI_ObjectClick_Button({buttonRef:duplicateButton}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
fmGUI_ObjectClick_Button({buttonRef:createButton}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
windowWaitUntil_FrontIS({windowName:"Edit Custom Menu Set"}) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set value of text field "Menu Set Name:" of window 1 to menuSetName of menuSetRec | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set value of text field "Comment:" of window 1 to menuSetComment of menuSetRec | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuTable to table 1 of scroll area 1 of window 1 | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuEditButton to first button of window 1 whose name starts with "Edit" | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuAddButton to first button of window 1 whose name starts with "Add" | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuRemoveButton to first button of window 1 whose name starts with "Remove" | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set initialRowCount to count of rows of table 1 of scroll area 1 of window 1 | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set menuNeededCount to count of menuList of menuSetRec | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
repeat with menuRowNumber from 1 to menuNeededCount | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set oneMenuRec to CustomMenu of item menuRowNumber of menuList of menuSetRec | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set nextCommand to null | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
select row menuRowNumber of menuTable | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set nextCommand to "CHECK" -- no error selecting, so EDIT. | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set rowSelected to row menuRowNumber of menuTable | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set nextCommand to "ADD" -- could NOT select specified row, so need to ADD a Menu, AFTER the previous row. | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
select row (menuRowNumber - 1) of menuTable | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
if nextCommand is "CHECK" then | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
if value of static text 1 of rowSelected is equal to menuName of oneMenuRec then | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set nextCommand to "EDIT" -- Has the MATCHING name, so edit it. | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
set nextCommand to "REPLACE" -- wrong menu, so replace. | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
if debugMode then my logConsole(ScriptName, menuName of oneMenuRec & " - " & nextCommand) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
if nextCommand is "ADD" or nextCommand is "REPLACE" then | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
if name of window 1 is "Edit Custom Menu Set" then | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
my fmGUI_ObjectClick_AffectsWindow(menuAddButton) | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
try -- to select the menu specified: | WIP_fmGUI_CustomMenus_MenuSet_CreateUpdate.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.