text
stringlengths
0
15.7k
source
stringlengths
6
112
newMethod("lastIndexOf")
string.applescript
assertEqual(26, my lastIndexOf("an apple a day makes the apple vendor happy", "apple"), "Found Word")
string.applescript
assertEqual(0, my lastIndexOf("/Users/cloud.strife/projects/@rt-learn-lang/applescript/DEPLOYED/Common/sublimetext3.applescript", "*"), "Not Found")
string.applescript
assertEqual(7, my lastIndexOf("/Users/cloud.strife", "/"), "Found")
string.applescript
logger's info("All unit test cases passed.")
string.applescript
end unitTest
string.applescript
set logger to std's import("logger")'s new("string")
string.applescript
key code 99
CornerLeftTowards.applescript
set _path to (path of library folder of local domain) as string
Library (local).applescript
whereIsRigCheck
Create link to select playback variants in rig check.applescript
set whereIsRigCheck to " RIG CHECK" -- the cue name of your rig check title cue – the cue this script creates will go underneath this
Create link to select playback variants in rig check.applescript
set allVariants to ""
Create link to select playback variants in rig check.applescript
set current cue list to first cue list whose q name is "Main Cue List"
Create link to select playback variants in rig check.applescript
set theCueList to cues in first cue list whose q name is "Select Playback Variants"
Create link to select playback variants in rig check.applescript
set cueBefore to (first cue in current cue list whose q name is whereIsRigCheck)
Create link to select playback variants in rig check.applescript
repeat with eachCue in (cues in (first cue list whose q name is "Select Playback Variants") as list)
Create link to select playback variants in rig check.applescript
if allVariants is "" then
Create link to select playback variants in rig check.applescript
set allVariants to item 2 of (util's splitString((q name of eachCue), ": "))
Create link to select playback variants in rig check.applescript
set allVariants to allVariants & ", " & item 2 of (util's splitString((q name of eachCue), ": "))
Create link to select playback variants in rig check.applescript
set selected to cueBefore
Create link to select playback variants in rig check.applescript
set scriptCheckCue to last item of (selected as list)
Create link to select playback variants in rig check.applescript
set scriptCheckCueID to uniqueID of scriptCheckCue
Create link to select playback variants in rig check.applescript
set q name of scriptCheckCue to " Set playback variants here: " & allVariants
Create link to select playback variants in rig check.applescript
set script source of scriptCheckCue to "tell application id \"com.figure53.Qlab.4\" to tell front workspace
Create link to select playback variants in rig check.applescript
set current cue list to first cue list whose q name is \"Select Playback Variants\"
Create link to select playback variants in rig check.applescript
property safari : "Safari"
scrape-google-analytics-JS.applescript
property highscore : 16000
scrape-google-analytics-JS.applescript
property thisyearshigh : 16000
scrape-google-analytics-JS.applescript
property currentscore : 16000
scrape-google-analytics-JS.applescript
set todayshigh to 1500
scrape-google-analytics-JS.applescript
set newdate to current date
scrape-google-analytics-JS.applescript
set increment to 5
scrape-google-analytics-JS.applescript
set closepage to 5
scrape-google-analytics-JS.applescript
set futuredate to newdate + increment
scrape-google-analytics-JS.applescript
set closedate to newdate + closepage
scrape-google-analytics-JS.applescript
set throttle to 5
scrape-google-analytics-JS.applescript
set closeslideout to false
scrape-google-analytics-JS.applescript
log "This year's high: " & thisyearshigh
scrape-google-analytics-JS.applescript
log "Previous Record: " & highscore
scrape-google-analytics-JS.applescript
delay throttle
scrape-google-analytics-JS.applescript
do JavaScript "var iframe = document.getElementById('galaxyIframe');"
scrape-google-analytics-JS.applescript
do JavaScript "var innerDoc = iframe.contentDocument;"
scrape-google-analytics-JS.applescript
do JavaScript "var counterValue = innerDoc.getElementById('ID-overviewCounterValue');"
scrape-google-analytics-JS.applescript
set currentscore to do JavaScript "counterValue.textContent;"
scrape-google-analytics-JS.applescript
set currentscore to currentscore + 0 --ensures we have a number
scrape-google-analytics-JS.applescript
set throttle to 3 -- throttle there is no movement
scrape-google-analytics-JS.applescript
if currentscore > todayshigh then
scrape-google-analytics-JS.applescript
set todayshigh to currentscore
scrape-google-analytics-JS.applescript
set today to get current date
scrape-google-analytics-JS.applescript
set myMonth to month of today as integer
scrape-google-analytics-JS.applescript
set myDay to day of today
scrape-google-analytics-JS.applescript
set myYear to year of today
scrape-google-analytics-JS.applescript
set myTime to time string of today
scrape-google-analytics-JS.applescript
set currentdate to (myMonth & "." & myDay & "." & myYear & " " & myTime) as string
scrape-google-analytics-JS.applescript
set myWeekDay to weekday of the (today) as string
scrape-google-analytics-JS.applescript
log myWeekDay & "'s Best: " & currentscore & " - " & currentdate
scrape-google-analytics-JS.applescript
set throttle to 1
scrape-google-analytics-JS.applescript
set throttle to 2
scrape-google-analytics-JS.applescript
if currentscore > highscore then
scrape-google-analytics-JS.applescript
set highscore to currentscore
scrape-google-analytics-JS.applescript
log "Record High:" & highscore
scrape-google-analytics-JS.applescript
set throttle to 0.1
scrape-google-analytics-JS.applescript
q
scrape-google-analytics-JS.applescript
set firstX to 1212
nordvpn on off.scpt
set firstY to 14
nordvpn on off.scpt
do shell script "eval $(/usr/libexec/path_helper -s); cliclick c:" & firstX & "," & firstY
nordvpn on off.scpt
delay 0.4
nordvpn on off.scpt
set secondX to 1223
nordvpn on off.scpt
set secondY to 90
nordvpn on off.scpt
do shell script "eval $(/usr/libexec/path_helper -s); cliclick c:" & secondX & "," & secondY
nordvpn on off.scpt
set customMD to custom meta data of this_item
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_type to mdtype of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_type to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_authors to mdauthors of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_author to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_editor to mdeditor of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_editor to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_translator to mdtranslator of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_translator to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_title to mdtitle of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_title to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_publisher to mdpublisher of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_publisher to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_date to mddate of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_date to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_link2 to mdlink2 of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_link2 to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_page to mdpage of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_page to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_abstract to mdabstract of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_abstract to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_bibkey to mdbibkey of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_bibkey to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_doi to mddoi of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_doi to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_sertitle to mdsertitle of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_sertitle to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_journal to mdjournal of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_journal to ""
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt
set the_issue to mdissue of customMD
Add%20Reference%20Smart%20Rule%20for%20DT3.scpt