text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
log mdTabMissing | marked copy.applescript |
set mdTab to sut's findTabWithName("Sublime Text-general.md") | marked copy.applescript |
if mdTab is not missing value then mdTab's closeTab() | marked copy.applescript |
sut's openFile(testFile2) | marked copy.applescript |
sut's openFileAsync(testFile2) | marked copy.applescript |
sut's toggleDarkMode() | marked copy.applescript |
sut's turnOnDarkMode() | marked copy.applescript |
sut's turnOnLightMode() | marked copy.applescript |
script MarkedInstance | marked copy.applescript |
on turnOnDarkMode() | marked copy.applescript |
tell application "System Events" to tell process "Marked" | marked copy.applescript |
set isChecked to value of attribute "AXMenuItemMarkChar" of menu item "Dark Mode" of menu 1 of menu bar item "Preview" of menu bar 1 is not missing value | marked copy.applescript |
if isChecked then return | marked copy.applescript |
toggleDarkMode() | marked copy.applescript |
end turnOnDarkMode | marked copy.applescript |
on turnOnLightMode() | marked copy.applescript |
if value of attribute "AXMenuItemMarkChar" of menu item "Dark Mode" of menu 1 of menu bar item "Preview" of menu bar 1 is missing value then return | marked copy.applescript |
end turnOnLightMode | marked copy.applescript |
on toggleDarkMode() | marked copy.applescript |
click menu item "Dark Mode" of menu 1 of menu bar item "Preview" of menu bar 1 | marked copy.applescript |
end toggleDarkMode | marked copy.applescript |
on openFileAsync(posixFilepath) | marked copy.applescript |
if not fileUtil's posixFilePathExists(posixFilepath) then return missing value | marked copy.applescript |
if running of application "Marked" is false then | marked copy.applescript |
set initialWinCount to _getSysEveWindowCount() | marked copy.applescript |
set isFirstWindow to initialWinCount is 0 | marked copy.applescript |
if not isFirstWindow then set frontMarkedTab to getFrontTab() | marked copy.applescript |
tell application "Marked" | marked copy.applescript |
open posixFilepath | marked copy.applescript |
end openFileAsync | marked copy.applescript |
on openFile(posixFilepath) | marked copy.applescript |
set tabInstance to my _new(front window) | marked copy.applescript |
set newWinCount to _getSysEveWindowCount() | marked copy.applescript |
if newWinCount is 2 then | marked copy.applescript |
frontMarkedTab's focus() | marked copy.applescript |
mergeWindows() | marked copy.applescript |
tabInstance's focus() | marked copy.applescript |
tabInstance | marked copy.applescript |
on getFrontTab() | marked copy.applescript |
if running of application "Marked" is false then return missing value | marked copy.applescript |
return my _new(front window) | marked copy.applescript |
end getFrontTab | marked copy.applescript |
on findTabWithName(documentName) | marked copy.applescript |
set appWindow to first window whose name starts with documentName | marked copy.applescript |
_new(appWindow) | marked copy.applescript |
end findTabWithName | marked copy.applescript |
on showCustomProcessorLog() | marked copy.applescript |
click menu item "Show Custom Processor Log" of menu 1 of menu bar item "Help" of menu bar 1 | marked copy.applescript |
end showCustomProcessorLog | marked copy.applescript |
on _new(pAppWindow) | marked copy.applescript |
script MarkedTabInstance | marked copy.applescript |
property appWindow : pAppWindow | marked copy.applescript |
on getDocumentName() | marked copy.applescript |
set windowName to name of appWindow | marked copy.applescript |
set zoomLessName to regex's firstMatchInString(".*(?=\\s\\(\\d{2}%\\))", windowName) | marked copy.applescript |
if zoomLessName is not missing value then return zoomLessName | marked copy.applescript |
windowName | marked copy.applescript |
end getDocumentName | marked copy.applescript |
on hideEditor() | marked copy.applescript |
click menu item "Hide Editor Pane" of menu 1 of menu bar item "View" of menu bar 1 | marked copy.applescript |
end try -- ignore if it don't exist | marked copy.applescript |
end hideEditor | marked copy.applescript |
on focus() | marked copy.applescript |
click (first menu item of first menu of menu bar item "Window" of first menu bar whose title is equal to name of my appWindow) | marked copy.applescript |
end focus | marked copy.applescript |
on closeTab() | marked copy.applescript |
tell appWindow to close | marked copy.applescript |
end closeTab | marked copy.applescript |
end _new | marked copy.applescript |
on mergeWindows() | marked copy.applescript |
click menu item "Merge All Windows" of menu 1 of menu bar item "Window" of menu bar 1 | marked copy.applescript |
if (count of windows) is 1 then exit repeat | marked copy.applescript |
end mergeWindows | marked copy.applescript |
on _getSysEveWindowCount() | marked copy.applescript |
count of windows | marked copy.applescript |
end _getSysEveWindowCount | marked copy.applescript |
set logger to std's import("logger")'s new("Marked") | marked copy.applescript |
tell application "System Events" to tell process "gfxCardStatus" | gpu_discrete.applescript |
click menu bar item 1 of menu bar 2 | gpu_discrete.applescript |
do shell script "killall System\\ Events" | gpu_discrete.applescript |
tell menu bar item 1 of menu bar 2 | gpu_discrete.applescript |
click menu item "Discrete Only" of menu 1 | gpu_discrete.applescript |
tell source 1 | Script 21-1.applescript |
tell library playlist 1 | Script 21-1.applescript |
every track whose artist is "Björk" | Script 21-1.applescript |
on findMatchingTab(urlPrefix) | Chrome Library.scpt |
set _win to false | Chrome Library.scpt |
set {idList, urlList} to {id, URL} of every tab of every window | Chrome Library.scpt |
if (urlList as text) contains urlPrefix = true then | Chrome Library.scpt |
set theWin to 1 | Chrome Library.scpt |
repeat with i in urlList | Chrome Library.scpt |
set theTab to 1 | Chrome Library.scpt |
repeat with n in i | Chrome Library.scpt |
if n starts with urlPrefix then | Chrome Library.scpt |
set {_win, _tab} to {theWin, theTab} | Chrome Library.scpt |
set theTab to theTab + 1 | Chrome Library.scpt |
set theWin to theWin + 1 | Chrome Library.scpt |
return {_win, _tab} | Chrome Library.scpt |
end findMatchingTab | Chrome Library.scpt |
on activateMatchingTab(targetWindow, targetTab) | Chrome Library.scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.