text
stringlengths
0
15.7k
source
stringlengths
6
112
Lorem ipsum dolor sit amet, consetetur sadipscing
regex.applescript
elitr. Invoice 18-54321 At vero eos et accusam et
regex.applescript
justo duo dolores et ea rebum. Stet clita kasd."
regex.applescript
regex(thePattern, theString)
regex.applescript
on regex(aPattern, aString)
regex.applescript
set myDelimiter to ("<DELIMITER_" & (random number from 100000 to 999999) as text) & ">"
regex.applescript
set phpScript to "
regex.applescript
error_reporting(0);
regex.applescript
$str = $argv[1];
regex.applescript
$regex = $argv[2];
regex.applescript
$matches = allRegexMatches($regex, $str);
regex.applescript
$matchesAsString = implode('" & myDelimiter & "', $matches);
regex.applescript
echo($matchesAsString);
regex.applescript
function allRegexMatches($pattern, $text) { @preg_match_all($pattern, $text, $matches, PREG_SET_ORDER); if ($matches === NULL) { return array('?'); }
regex.applescript
$allMatches = array();
regex.applescript
for ($i = 0; $i < count($matches); $i++ ) { if (isset($matches[$i][1]) && trim($matches[$i][1]) != '') { $allMatches[] = trim($matches[$i][1]); }
regex.applescript
return $allMatches;
regex.applescript
set shellCommand to "/usr/bin/php -r " & quoted form of phpScript & " " & quoted form of aString & " " & quoted form of aPattern
regex.applescript
set phpOutput to do shell script shellCommand
regex.applescript
set text item delimiters to myDelimiter
regex.applescript
set allMatches to text items of phpOutput
regex.applescript
return allMatches
regex.applescript
end regex
regex.applescript
global calOfSelected
TryToFindSelectedEvent.applescript
set calOfSelected to ""
TryToFindSelectedEvent.applescript
global descOfSelected
TryToFindSelectedEvent.applescript
set descOfSelected to ""
TryToFindSelectedEvent.applescript
global theFocusedEvent
TryToFindSelectedEvent.applescript
global theCalEvent
TryToFindSelectedEvent.applescript
set theCalApp to application process "Calendar"
TryToFindSelectedEvent.applescript
set eventList to item 1 of group 1 of splitter group 1 of first window of theCalApp
TryToFindSelectedEvent.applescript
set theFocusedEvent to first static text of list 1 of eventList whose focused is true
TryToFindSelectedEvent.applescript
set tHelp to help of theFocusedEvent
TryToFindSelectedEvent.applescript
set calOfSelected to (characters ((get offset of "\"" in tHelp) + 1) through ((length of tHelp) - 2) of tHelp) as text
TryToFindSelectedEvent.applescript
set tStr to description of theFocusedEvent
TryToFindSelectedEvent.applescript
set descOfSelected to (characters 1 through ((get offset of "at" in tStr) - 1) of tStr) as text
TryToFindSelectedEvent.applescript
tell UI element 3 of group 1 of splitter group 1 of first window of theCalApp
TryToFindSelectedEvent.applescript
set theSelectedDOM to first static text whose selected is true
TryToFindSelectedEvent.applescript
set monthYear to value of static text 1 of splitter group 1 of splitter group 1 of first window of theCalApp
TryToFindSelectedEvent.applescript
set theStartDate to date (((1st word of monthYear) & " " & (name of theSelectedDOM) & ", " & (2nd word of monthYear)) as string)
TryToFindSelectedEvent.applescript
set theEndDate to theStartDate + (1 * days) - (1 * minutes)
TryToFindSelectedEvent.applescript
set eventList to {}
TryToFindSelectedEvent.applescript
set calList to (calendars where its title starts with calOfSelected)
TryToFindSelectedEvent.applescript
repeat with theCal in calList
TryToFindSelectedEvent.applescript
tell theCal
TryToFindSelectedEvent.applescript
set eventList to eventList & (events whose summary contains descOfSelected and start date is greater than or equal to theStartDate and end date is less than theEndDate)
TryToFindSelectedEvent.applescript
if errorNumber is not equal to -1712 then -- not AppleEvent timed out
TryToFindSelectedEvent.applescript
fmGUI_DataViewer_Open({fullAccessAccountName:"", fullAccessPassword:""})
fmGUI_DataViewer_Open.applescript
on fmGUI_DataViewer_Open(prefs)
fmGUI_DataViewer_Open.applescript
set dvName to "Data Viewer"
fmGUI_DataViewer_Open.applescript
set dvWindow to first window whose name is equal to dvName
fmGUI_DataViewer_Open.applescript
set dataViewerMenuItem to null
fmGUI_DataViewer_Open.applescript
set dataViewerMenuItem to menu item dvName of menu "Tools" of menu bar item "Tools" of menu bar 1
fmGUI_DataViewer_Open.applescript
if dataViewerMenuItem is not null then
fmGUI_DataViewer_Open.applescript
fmGUI_ClickMenuItem({menuItemRef:dataViewerMenuItem})
fmGUI_DataViewer_Open.applescript
get scroll area 1 of tab group 1 of window 1
fmGUI_DataViewer_Open.applescript
set authButton to first button of tab group 1 of dvWindow whose description contains "Auth"
fmGUI_DataViewer_Open.applescript
clickObjectByCoords(authButton)
fmGUI_DataViewer_Open.applescript
fmGUI_AuthenticateDialog({accountName:fullAccessAccountName of prefs, pwd:fullAccessPassword of prefs, windowname:"Authenticate"})
fmGUI_DataViewer_Open.applescript
error "unable to fmGUI_DataViewer_Open - " & errMsg number errNum
fmGUI_DataViewer_Open.applescript
end fmGUI_DataViewer_Open
fmGUI_DataViewer_Open.applescript
set pidList to pidList as text
Get Process ID Of Application.applescript
set pidList to characters 1 thru 5 of pidList
Get Process ID Of Application.applescript
set pidList to pidList as string
Get Process ID Of Application.applescript
display dialog pidList
Get Process ID Of Application.applescript
windowResize's windowResize(-1, 0)
windowResizeWidthMinus.applescript
property pTriggerLaunchApplications : {"MATLAB"}
quit-open.applescript
property pTriggerTerminateApplications : {"MATLAB"}
quit-open.applescript
property pOpenOnLaunchApplications : {"Cisco AnyConnect Secure Mobility Client"}
quit-open.applescript
property pCloseOnLaunchApplication : {"Flexiglass"}
quit-open.applescript
property pOpenOnTerminateApplications : {"Flexiglass"}
quit-open.applescript
property pHideOnOpenAfterTerminateApplications : {"Flexiglass"}
quit-open.applescript
property pCloseOnTerminateApplications : {"Cisco AnyConnect Secure Mobility Client"}
quit-open.applescript
property pNSWorkspace : class "NSWorkspace"
quit-open.applescript
tell (pNSWorkspace's sharedWorkspace())'s notificationCenter()
quit-open.applescript
addObserver_selector_name_object_(me, "appQuitNotification:", "NSWorkspaceDidTerminateApplicationNotification", missing value)
quit-open.applescript
addObserver_selector_name_object_(me, "appLaunchNotification:", "NSWorkspaceDidLaunchApplicationNotification", missing value)
quit-open.applescript
on appLaunchNotification_(notification)
quit-open.applescript
set theLauchedApplication to (notification's userInfo's NSWorkspaceApplicationKey's localizedName()) as text
quit-open.applescript
if theLauchedApplication is in pTriggerLaunchApplications then
quit-open.applescript
repeat with applicationToOpen in pOpenOnLaunchApplications
quit-open.applescript
tell application applicationToOpen to activate
quit-open.applescript
repeat with applicationtoClose in pCloseOnLaunchApplication
quit-open.applescript
tell application applicationtoClose to quit
quit-open.applescript
end appLaunchNotification_
quit-open.applescript
on appQuitNotification_(notification)
quit-open.applescript
if theLauchedApplication is in pTriggerTerminateApplications then
quit-open.applescript
repeat with applicationToOpen in pOpenOnTerminateApplications
quit-open.applescript
tell application applicationToOpen to count windows
quit-open.applescript
on error message
quit-open.applescript
enableAppleScripting(applicationToOpen)
quit-open.applescript
tell application applicationToOpen to quit
quit-open.applescript
if applicationToOpen is in pHideOnOpenAfterTerminateApplications then
quit-open.applescript
tell application applicationToOpen to close every window
quit-open.applescript
repeat with applicationtoClose in pCloseOnTerminateApplications
quit-open.applescript
end appQuitNotification_
quit-open.applescript
on enableAppleScripting(theApplication)
quit-open.applescript
set application_path to (path to application theApplication)
quit-open.applescript
set bundle_identifier to get bundle identifier of (info for the application_path)
quit-open.applescript
set the application_to_modify to (application file id bundle_identifier) as alias
quit-open.applescript