-
Math.E: numberES1Euler’s number, base of the natural logarithms, approximately 2.7182818284590452354.
-
Math.LN10: numberES1
None of the string methods modify this – they always return fresh strings.
-
charAt(pos: number): stringES1Returns the character at index
pos, as a string (JavaScript does not have a datatype for characters).str[i]is equivalent tostr.charAt(i)and more concise (caveat: may not work on old engines).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set myVPNs to {"us1.vpnhide.com", "us2.vpnhide.com", "us3.vpnhide.com", "us4.vpnhide.com", "us5.vpnhide.com", "sg1.vpnhide.com", "sg2.vpnhide.com", "jp1.vpnhide.com", "jp2.vpnhide.com", "jp3.vpnhide.com", "tw1.vpnhide.com", "hk1.vpnhide.com", "hk2.vpnhide.com"} | |
| set currentVPN to 0 | |
| set isPingLessThan400Count to 0 | |
| set vpn_name to "YUN (L2TP)" | |
| set vpnExists to false | |
| on vpn_status(vpn_name) | |
| tell application "System Events" | |
| return connected of configuration of service vpn_name of network preferences | |
| end tell |