text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set point_list to {{x_val, y_val}, {x_val, y_val}, {x_val, y_val}} & point_list
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if top_yn is equal to "y" or top_yn is equal to "Y" then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
repeat while ctr < x_limit
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to (x_val + zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if ctr mod 2 = 1 then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to (y_val + zag_depth)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to (y_val - zag_depth)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if ctr mod 2 = 1 then --ends up, then return to baseline
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to y_val + zag_depth
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
else --if side shouldn't be cropped, starting and end points
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to x_val + ((x_limit - 1) * zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if right_yn is equal to "y" or right_yn is equal to "Y" then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
repeat while ctr < y_limit
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to (y_val + zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to (x_val + zag_depth)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to (x_val - zag_depth)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if ctr mod 2 = 0 then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to x_val - zag_depth
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to y_val + ((y_limit - 1) * zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if bottom_yn is equal to "y" or bottom_yn is equal to "Y" then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to (x_val - zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to x_val - ((x_limit - 1) * zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if shape_width = 713 then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set x_val to x_val - 10
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
if left_yn is equal to "y" or left_yn is equal to "Y" then
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to (y_val - zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set y_val to y_val - ((y_limit - 1) * zag_length)
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
tell canvas 1
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
make new shape at beginning of graphics with properties {point list:point_list, draws shadow:false, fill:no fill, stroke color:{1.0, 0, 0.7}, thickness:1}
|
zigzag-rectangle-omnigraffle-applescript.scpt
|
set totalTasks to 0
|
Tasks Remaining.applescript
|
if oTask is not completed then
|
Tasks Remaining.applescript
|
set strp to pLine & " " & lngDone & tab
|
Tasks Remaining.applescript
|
set totalTasks to totalTasks + lngDone
|
Tasks Remaining.applescript
|
set str to str & return & "total tasks = " & totalTasks
|
Tasks Remaining.applescript
|
execute javascript "button = document.getElementsByClassName('ytp-play-button')[0]
|
pause_play_yt.applescript
|
if (button) {
button.click()
}"
|
pause_play_yt.applescript
|
on run {monitor_pid, youtubedl_pid, MacYTDL_custom_icon_file_not_posix_monitor, MacYTDL_preferences_path_monitor, YTDL_log_file_monitor, downloadsFolder_Path_monitor, diag_Title_quoted_monitor, DL_description_monitor, is_Livestream_Flag_monitor, download_filename_monitor, download_filename_new_monitor, download_filename_new_monitor_plain, YTDL_simulate_log_monitor}
|
adviser.applescript
|
set pathToBundle to (path to me) as text
|
adviser.applescript
|
set pathToBundleShort to text 1 thru -40 of pathToBundle
|
adviser.applescript
|
set alerterPath to quoted form of (POSIX path of (pathToBundleShort & "Contents:Resources:"))
|
adviser.applescript
|
set YTDL_log_file_monitor to POSIX file YTDL_log_file_monitor
|
adviser.applescript
|
set num_paragraphs_file_name to count of paragraphs of download_filename_new_monitor_plain
|
adviser.applescript
|
if num_paragraphs_file_name is greater than 1 then
|
adviser.applescript
|
repeat with find_paragraph in paragraphs of download_filename_new_monitor_plain
|
adviser.applescript
|
if find_paragraph does not contain "ERROR:" and find_paragraph does not contain "WARNING:" then
|
adviser.applescript
|
set download_filename_play to find_paragraph
|
adviser.applescript
|
set download_filename_play to download_filename_new_monitor_plain
|
adviser.applescript
|
if download_filename_new_monitor is "the saved batch" then
|
adviser.applescript
|
set download_filename_play to download_filename_monitor
|
adviser.applescript
|
do shell script "ps -p" & monitor_pid
|
adviser.applescript
|
do shell script "ps -p" & youtubedl_pid
|
adviser.applescript
|
if DL_description_monitor is "Yes" then
|
adviser.applescript
|
do shell script "for file in " & quoted form of downloadsFolder_Path_monitor & "/*.description; do mv \"$file\" \"${file/.description/.txt}\" > /dev/null 2> /dev/null ; done"
|
adviser.applescript
|
set theAdviserButtonsCloseLabel1 to localized string "Close" in bundle file pathToBundleShort from table "MacYTDL"
|
adviser.applescript
|
set subtitleText to quoted form of ("“" & download_filename_new_monitor_plain & "”")
|
adviser.applescript
|
set error39 to false
|
adviser.applescript
|
set YTDL_log to read file YTDL_log_file_monitor as text
|
adviser.applescript
|
if errmsg contains "End of file" then
|
adviser.applescript
|
set error39 to true
|
adviser.applescript
|
display dialog "Error in Adviser reading log file: " & YTDL_log_file_monitor & return & "The error reported was " & errmsg
|
adviser.applescript
|
if (YTDL_log contains "100%" or is_Livestream_Flag_monitor is "True") and YTDL_log does not contain "ERROR:" then
|
adviser.applescript
|
if (YTDL_log contains "Requested formats are incompatible for merge and will be merged into mkv" or YTDL_log contains "doesn't support embedding a thumbnail, mkv will be used") and YTDL_log does not contain "Converting video from mkv to " then
|
adviser.applescript
|
set start_extension to offset of "." in download_filename_play
|
adviser.applescript
|
set download_filename_play to (text 1 thru start_extension of download_filename_play) & "mkv"
|
adviser.applescript
|
set theAdviserTextLabel1 to quoted form of (localized string "MacYTDL download finished:" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set theAdviserTextLabel2 to quoted form of (localized string "Click to open downloads folder" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set theAdviserButtonsCloseLabel2 to localized string "Play" in bundle file pathToBundleShort from table "MacYTDL"
|
adviser.applescript
|
set adviser_button to do shell script alerterPath & "/alerter -message " & theAdviserTextLabel2 & " -title " & theAdviserTextLabel1 & " -subtitle " & subtitleText & " -closeLabel " & theAdviserButtonsCloseLabel1 & " -timeout 10 -sender com.apple.script.id.MacYTDL -actions " & theAdviserButtonsCloseLabel2
|
adviser.applescript
|
if adviser_button is theAdviserButtonsCloseLabel2 then
|
adviser.applescript
|
if is_Livestream_Flag_monitor is "True" then
|
adviser.applescript
|
repeat with find_paragraph in paragraphs of YTDL_log
|
adviser.applescript
|
if find_paragraph contains "[download] Destination:" then
|
adviser.applescript
|
set offset_download to offset of "[download] Destination:" in find_paragraph
|
adviser.applescript
|
set download_filename_play to text (offset_download + 24) thru end of find_paragraph
|
adviser.applescript
|
if download_filename_play contains "Users" then
|
adviser.applescript
|
set pathToVideoFile to POSIX file (download_filename_play)
|
adviser.applescript
|
set pathToVideoFile to POSIX file (downloadsFolder_Path_monitor & "/" & download_filename_play)
|
adviser.applescript
|
open pathToVideoFile as alias
|
adviser.applescript
|
else if adviser_button is "@CONTENTCLICKED" then
|
adviser.applescript
|
open (downloadsFolder_Path_monitor as POSIX file)
|
adviser.applescript
|
set the position of the front Finder window to {100, 100}
|
adviser.applescript
|
set batch_file to POSIX file (MacYTDL_preferences_path_monitor & batch_filename)
|
adviser.applescript
|
display dialog "There was an error: " & batch_errMsg & "batch_file: " & batch_file buttons {"OK"} default button {"OK"}
|
adviser.applescript
|
else if YTDL_log contains "ERROR:" or error39 is true then
|
adviser.applescript
|
set theAdviserTextLabel1 to quoted form of (localized string "MacYTDL download error with:" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set theAdviserTextLabel2 to quoted form of (localized string "Click to open downloads or Options" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set theAdviserButtonsCloseLabel2 to localized string "Options" in bundle file pathToBundleShort from table "MacYTDL"
|
adviser.applescript
|
set theAdviserButtonsCloseLabel3 to quoted form of (localized string "Open Log" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set theAdviserButtonsCloseLabel4 to quoted form of (localized string "Show Logs" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set adviser_button to do shell script alerterPath & "/alerter -message " & theAdviserTextLabel2 & " -title " & theAdviserTextLabel1 & " -subtitle " & subtitleText & " -closeLabel " & theAdviserButtonsCloseLabel1 & " -timeout 20 -sender com.apple.script.id.MacYTDL -actions " & theAdviserButtonsCloseLabel3 & "," & theAdviserButtonsCloseLabel4 & " -dropdownLabel " & theAdviserButtonsCloseLabel2
|
adviser.applescript
|
if adviser_button is text 2 thru -2 of theAdviserButtonsCloseLabel3 then
|
adviser.applescript
|
set theFile to POSIX path of YTDL_log_file_monitor
|
adviser.applescript
|
openFile(theFile)
|
adviser.applescript
|
else if adviser_button is text 2 thru -2 of theAdviserButtonsCloseLabel4 then
|
adviser.applescript
|
open (MacYTDL_preferences_path_monitor as POSIX file)
|
adviser.applescript
|
else if YTDL_log does not contain "ERROR:" and YTDL_log does not contain "100%" and YTDL_log does not contain "has already been downloaded" and is_Livestream_Flag_monitor is "False" then
|
adviser.applescript
|
set theAdviserTextLabel1 to quoted form of (localized string "MacYTDL download incomplete:" in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
set theAdviserTextLabel2 to quoted form of (localized string "Click \"Options\" to troubleshoot." in bundle file pathToBundleShort from table "MacYTDL")
|
adviser.applescript
|
on openFile(theFile) -- theFile is POSIX path
|
adviser.applescript
|
on openTheFile(theFile)
|
adviser.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.