text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set text item delimiters to ":"
|
copy-server-loc copy.applescript
|
set filePath to text items of (oneFile as text)
|
copy-server-loc copy.applescript
|
set end of macFilePath to filePath as text
|
copy-server-loc copy.applescript
|
set macFilePath to macFilePath as text
|
copy-server-loc copy.applescript
|
set macFilePath1 to SAR(macFilePath, " ", "%20")
|
copy-server-loc copy.applescript
|
set winFilePath to {}
|
copy-server-loc copy.applescript
|
set text item delimiters to "\\"
|
copy-server-loc copy.applescript
|
set end of winFilePath to filePath as text
|
copy-server-loc copy.applescript
|
set winFilePath to winFilePath as text
|
copy-server-loc copy.applescript
|
set winFilePath1 to SAR(winFilePath, " ", "%20")
|
copy-server-loc copy.applescript
|
set the clipboard to "******************************************" & return & "Mac Path: " & return & "afp://" & ipAdress & "/" & macFilePath1 & return & return & "If the link is broken, copy (apple+c) and paste (apple+v) whole link into Connect to Server (apple + k) " & return & return & "******************************************" & return & "Windows Path:" & return & "\\\\" & ipAdress & "\\" & winFilePath1 & return & return & "If the link is broken, copy (ctrl+c) and paste (ctrl+v) whole link into Windows Explorer " & return & return & "******************************************"
|
copy-server-loc copy.applescript
|
on idle
|
Safari idle script to close popunders.applescript
|
repeat with t in tabs of windows
|
Safari idle script to close popunders.applescript
|
tell t
|
Safari idle script to close popunders.applescript
|
if URL contains "adrotator.se" then close
|
Safari idle script to close popunders.applescript
|
return 3
|
Safari idle script to close popunders.applescript
|
end idle
|
Safari idle script to close popunders.applescript
|
name of (path to me)
|
name of (path to me).applescript
|
repeat with w in every window
|
pause.applescript
|
repeat with t in every tab in w
|
pause.applescript
|
if "vk.com" is in (get URL of t) then
|
pause.applescript
|
set js to "//Set up jQuery
|
pause.applescript
|
var script = document.createElement('script');
|
pause.applescript
|
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js';
|
pause.applescript
|
document.getElementsByTagName('head')[0].appendChild(script);
|
pause.applescript
|
$('#ac_play.playing').click();
|
pause.applescript
|
"
|
pause.applescript
|
execute javascript(js)
|
pause.applescript
|
global userToken
|
DUO ANYCONNECT NEW.scpt
|
set resetPassword to ""
|
DUO ANYCONNECT NEW.scpt
|
set clearSettings to ""
|
DUO ANYCONNECT NEW.scpt
|
global prefsName
|
DUO ANYCONNECT NEW.scpt
|
global myPassword
|
DUO ANYCONNECT NEW.scpt
|
set prefsName to "AnyConnectDuo"
|
DUO ANYCONNECT NEW.scpt
|
on RecurseUIForElem(ParentUIElem, ElemRole, ElemDescription)
|
DUO ANYCONNECT NEW.scpt
|
set ResultElem to (UI elements of ParentUIElem whose role is ElemRole and (title is ElemDescription or description is ElemDescription))
|
DUO ANYCONNECT NEW.scpt
|
if ResultElem is not {} then
|
DUO ANYCONNECT NEW.scpt
|
return item 1 of ResultElem
|
DUO ANYCONNECT NEW.scpt
|
repeat with UIElem in UI elements of ParentUIElem
|
DUO ANYCONNECT NEW.scpt
|
set ResultElem to my RecurseUIForElem(UIElem, ElemRole, ElemDescription)
|
DUO ANYCONNECT NEW.scpt
|
return ResultElem
|
DUO ANYCONNECT NEW.scpt
|
on error errStr number errorNumber
|
DUO ANYCONNECT NEW.scpt
|
if the errorNumber is equal to -1719 then
|
DUO ANYCONNECT NEW.scpt
|
return {}
|
DUO ANYCONNECT NEW.scpt
|
error errStr number errorNumber
|
DUO ANYCONNECT NEW.scpt
|
end RecurseUIForElem
|
DUO ANYCONNECT NEW.scpt
|
on RecurseUIForAttribute(ParentUIElem, AttrName, AttrVal)
|
DUO ANYCONNECT NEW.scpt
|
repeat with ElemAttr in ((attributes of ParentUIElem) whose name is AttrName)
|
DUO ANYCONNECT NEW.scpt
|
if AttrVal is "" or AttrVal is value of ElemAttr then
|
DUO ANYCONNECT NEW.scpt
|
return ParentUIElem
|
DUO ANYCONNECT NEW.scpt
|
set ResultElem to my RecurseUIForAttribute(UIElem, AttrName, AttrVal)
|
DUO ANYCONNECT NEW.scpt
|
end RecurseUIForAttribute
|
DUO ANYCONNECT NEW.scpt
|
on GetUIAncestor(UIElement, GenCount)
|
DUO ANYCONNECT NEW.scpt
|
repeat GenCount times
|
DUO ANYCONNECT NEW.scpt
|
set UIElement to value of attribute "AXParent" of UIElement
|
DUO ANYCONNECT NEW.scpt
|
return UIElement
|
DUO ANYCONNECT NEW.scpt
|
end GetUIAncestor
|
DUO ANYCONNECT NEW.scpt
|
on KeyChainer(action)
|
DUO ANYCONNECT NEW.scpt
|
set returnValue to ""
|
DUO ANYCONNECT NEW.scpt
|
set myPassword to do shell script "security 2>&1 >/dev/null find-generic-password -gl " & prefsName & " | sed -n 's/^password: \"\\([^\"]*\\)\"/\\1/p'"
|
DUO ANYCONNECT NEW.scpt
|
if (length of myPassword is 0) then
|
DUO ANYCONNECT NEW.scpt
|
my_Prefs("reset", "resetpwd")
|
DUO ANYCONNECT NEW.scpt
|
if action is "delete" then
|
DUO ANYCONNECT NEW.scpt
|
return ""
|
DUO ANYCONNECT NEW.scpt
|
set passwordq to display dialog ("What is the AnyConnect Password") default answer "" with title name of me with hidden answer
|
DUO ANYCONNECT NEW.scpt
|
set myPassword to text returned of passwordq
|
DUO ANYCONNECT NEW.scpt
|
set b to do shell script "defaults read com.cisco." & prefsName & " saved"
|
DUO ANYCONNECT NEW.scpt
|
set b to "1"
|
DUO ANYCONNECT NEW.scpt
|
on error -- no previous setting
|
DUO ANYCONNECT NEW.scpt
|
set b to display dialog "Do you want to save this in your Keychain?" & return & return & "This is only asked on the first run" & return & return & "If you select no you will be prompted everytime for your password" buttons {"Yes", "No"} default button "No" giving up after 5 with title name of me with icon caution
|
DUO ANYCONNECT NEW.scpt
|
if button returned of b is "Yes" then
|
DUO ANYCONNECT NEW.scpt
|
set b to display dialog "ARE YOU SURE YOU KNOW WHAT YOU ARE DOING?" buttons {"Yes", "No"} default button "No" with title name of me with icon stop
|
DUO ANYCONNECT NEW.scpt
|
my_Prefs("set", "yes")
|
DUO ANYCONNECT NEW.scpt
|
my_Prefs("saved", "no")
|
DUO ANYCONNECT NEW.scpt
|
set returnValue to myPassword
|
DUO ANYCONNECT NEW.scpt
|
return returnValue
|
DUO ANYCONNECT NEW.scpt
|
end KeyChainer
|
DUO ANYCONNECT NEW.scpt
|
on legalWarning()
|
DUO ANYCONNECT NEW.scpt
|
set autoOkPropName to "autoOk"
|
DUO ANYCONNECT NEW.scpt
|
set autoOk to do shell script "defaults read com.cisco." & prefsName & " legalwarning"
|
DUO ANYCONNECT NEW.scpt
|
set autoOk to (autoOk = "1")
|
DUO ANYCONNECT NEW.scpt
|
set b to display dialog "Acknowledge you have read the below legal message." & return & "You MUST read the text at least once, and promise to hum the words to yourself every time you log in." & return & return & "NOTE: DO NOT dial emergency response numbers (e.g. 911,112) from software telephony clients." & return & "Your exact location and the appropriate emergency response agency may not be easily identified." & return & return & "The following countries restrict use of VoIP software via VPN over the Internet: UAE, Saudi Arabia, Pakistan, Lebanon, Jordan, Egypt, Oman, Qatar, Yemen, Algeria and Kuwait." buttons {"Acknowledged"} default button "Acknowledged" with title "Acknowledge Legal Notice" with icon caution
|
DUO ANYCONNECT NEW.scpt
|
set autoOk to "1"
|
DUO ANYCONNECT NEW.scpt
|
my_Prefs("set", "autoOk")
|
DUO ANYCONNECT NEW.scpt
|
end legalWarning
|
DUO ANYCONNECT NEW.scpt
|
on checkConnection()
|
DUO ANYCONNECT NEW.scpt
|
set AppName to "Cisco AnyConnect Secure Mobility Client"
|
DUO ANYCONNECT NEW.scpt
|
tell application AppName to activate
|
DUO ANYCONNECT NEW.scpt
|
set AppProc to application process AppName
|
DUO ANYCONNECT NEW.scpt
|
click menu item "Show AnyConnect Window" of menu 1 of menu bar item "Cisco AnyConnect Secure Mobility Client" of menu bar 1 of AppProc
|
DUO ANYCONNECT NEW.scpt
|
set ACWindow to item 1 of (windows of AppProc whose description is "standard window" and title is "")
|
DUO ANYCONNECT NEW.scpt
|
if (static texts of ACWindow whose value is "Ready to connect.") is {} then
|
DUO ANYCONNECT NEW.scpt
|
set b to display dialog "Maybe already connected?" buttons {"Disconnect", "Quit"} default button "Disconnect" with title name of me
|
DUO ANYCONNECT NEW.scpt
|
if button returned of b is "Disconnect" then
|
DUO ANYCONNECT NEW.scpt
|
click button "Disconnect" of ACWindow
|
DUO ANYCONNECT NEW.scpt
|
tell application "Cisco AnyConnect Secure Mobility Client.app" to quit
|
DUO ANYCONNECT NEW.scpt
|
display notification "VPN Disconnected by User" with title "Duo AnyConnect"
|
DUO ANYCONNECT NEW.scpt
|
else if button returned of b is "Quit" then
|
DUO ANYCONNECT NEW.scpt
|
end tell -- trying some new end tell statements.
|
DUO ANYCONNECT NEW.scpt
|
end checkConnection
|
DUO ANYCONNECT NEW.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.