text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
|---|---|
set (item ch_loopV of changelog_text_l) to ""
|
updateApp.applescript
|
set changelog_text to changelog_text_l as string
|
updateApp.applescript
|
set changelog_text to snr(changelog_text, "<br>", "
|
updateApp.applescript
|
set the contents of text view 1 of scroll view 1 of window "updatewindow" to changelog_text
|
updateApp.applescript
|
end updateMePlus
|
updateApp.applescript
|
if the name of theObject is "update" then
|
updateApp.applescript
|
updateMePlus(false)
|
updateApp.applescript
|
else if the name of theObject is "forgotPWMI" then
|
updateApp.applescript
|
open location (homeRootURL & "web/reset_pw")
|
updateApp.applescript
|
else if the name of theObject is "homepageMI" then
|
updateApp.applescript
|
open location (homeRootURL)
|
updateApp.applescript
|
else if the name of theObject is "leaveFeedbackMI" then
|
updateApp.applescript
|
open location "mailto:leifh90@gmail.com?Subject=audiMate Feedback (v" & current_version & ")"
|
updateApp.applescript
|
display dialog "If your default email client did not open, send your feedback to the following address:" default answer "leifh90@gmail.com" with icon 0
|
updateApp.applescript
|
if button returned of result is not "Cancel" then
|
updateApp.applescript
|
display dialog "Please use a subject like this to ensure the fastest possible turnaround:" default answer ("audiMate Feedback (v" & current_version & ")") with icon 0
|
updateApp.applescript
|
if the title of theObject is (localized string "CLOSE_TEXT") then
|
updateApp.applescript
|
close panel window "updatewindow"
|
updateApp.applescript
|
set title of button "downloadupdate" of window "updatewindow" to (localized string "CLOSE_TEXT")
|
updateApp.applescript
|
else if the title of theObject is (localized string "DOWNLOAD_TEXT") then
|
updateApp.applescript
|
set update_v to word 1 of (do shell script "curl http://audimate.me/current/index.php")
|
updateApp.applescript
|
set thedownloadsite to (homeRootURL & "past/audiMatev" & update_v & ".dmg") as string
|
updateApp.applescript
|
set visible of button "downloadupdate" of window "updatewindow" to false
|
updateApp.applescript
|
set enabled of button "downloadupdate" of window "updatewindow" to false
|
updateApp.applescript
|
set abxi to ("curl " & thedownloadsite & " -o " & quoted form of ((POSIX path of (path to desktop)) & "audiMate " & update_v & ".dmg") & " &> " & quoted form of (appsup & "updateLog.txt") & " & echo $!")
|
updateApp.applescript
|
do shell script abxi
|
updateApp.applescript
|
set updatePID to result
|
updateApp.applescript
|
set theDownloadGo to true
|
updateApp.applescript
|
set visible of progress indicator 1 of window "updatewindow" to true
|
updateApp.applescript
|
set (the contents of text field 1 of window "updatewindow") to (localized string "DOWNLOADINGTODESKTOP")
|
updateApp.applescript
|
repeat until theDownloadGo is false
|
updateApp.applescript
|
delay (0.5)
|
updateApp.applescript
|
set curOutUpdateFile to (do shell script "cat " & quoted form of (appsup & "updateLog.txt")) as string
|
updateApp.applescript
|
set curOutUpdateFile to (word 1 of (the last paragraph of curOutUpdateFile)) as string
|
updateApp.applescript
|
update_progress(curOutUpdateFile, 100, "updatewindow")
|
updateApp.applescript
|
set thisWeirdNumber to (100 - curOutUpdateFile)
|
updateApp.applescript
|
set (the contents of text field 1 of window "updatewindow") to ((localized string "DOWNLOADINGTODESKTOP") & thisWeirdNumber & "% " & snr((localized string "DOWNLOADINGTODESKTOP2"), "50%", ""))
|
updateApp.applescript
|
((count of paragraphs in (do shell script "ps -p " & updatePID)) > 1)
|
updateApp.applescript
|
set (the contents of text field 1 of window "updatewindow") to ""
|
updateApp.applescript
|
update_progress(0, 100, "updatewindow")
|
updateApp.applescript
|
set title of button 1 of window "updatewindow" to (localized string "CLOSE_TEXT")
|
updateApp.applescript
|
do shell script "kill " & updatePID
|
updateApp.applescript
|
on should close theObject
|
updateApp.applescript
|
if the name of theObject is "updatewindow" then
|
updateApp.applescript
|
if theDownloadGo is true then
|
updateApp.applescript
|
hide window "updatewindow"
|
updateApp.applescript
|
end should close
|
updateApp.applescript
|
on update_progress(iteration, total_count, windowVar)
|
updateApp.applescript
|
tell window windowVar
|
updateApp.applescript
|
if iteration = 1 then
|
updateApp.applescript
|
tell progress indicator 1 to start
|
updateApp.applescript
|
set indeterminate of progress indicator 1 to true
|
updateApp.applescript
|
tell progress indicator 1 to stop
|
updateApp.applescript
|
set indeterminate of progress indicator 1 to false
|
updateApp.applescript
|
set maximum value of progress indicator 1 to total_count
|
updateApp.applescript
|
set content of progress indicator 1 to iteration
|
updateApp.applescript
|
update
|
updateApp.applescript
|
end update_progress
|
updateApp.applescript
|
on common_displayDialog(thediatext, butttext, cancelenabled)
|
updateApp.applescript
|
if cancelenabled is true then
|
updateApp.applescript
|
display dialog (thediatext) buttons {"Cancel", butttext} with icon 0
|
updateApp.applescript
|
display dialog (thediatext) buttons {butttext} with icon 0
|
updateApp.applescript
|
end common_displayDialog
|
updateApp.applescript
|
on snr(the_string, search_string, replace_string)
|
updateApp.applescript
|
tell (a reference to my text item delimiters)
|
updateApp.applescript
|
set {old_tid, contents} to {contents, search_string}
|
updateApp.applescript
|
set {the_string, contents} to {the_string's text items, replace_string}
|
updateApp.applescript
|
set {the_string, contents} to {"" & the_string, old_tid}
|
updateApp.applescript
|
return the_string
|
updateApp.applescript
|
end snr
|
updateApp.applescript
|
on cv_string2int(cv_string)
|
updateApp.applescript
|
set cv_int to snr(cv_string, ",", "")
|
updateApp.applescript
|
set cv_int to snr(cv_int, "b", ",") as string
|
updateApp.applescript
|
if cv_int does not contain "," then
|
updateApp.applescript
|
set cv_int to (cv_int & ",!") as string
|
updateApp.applescript
|
return cv_int
|
updateApp.applescript
|
end cv_string2int
|
updateApp.applescript
|
on finishUpdateLoad(update_c_download)
|
updateApp.applescript
|
set contents of (text field 1 of window "updatewindow") to (localized string "YOURVERSIONTEXT") & " " & current_version & return & (localized string "CURRENTVERSION") & " " & update_v
|
updateApp.applescript
|
set update_dlURL to (item 2 of split(update_c_download, ("<!--v" & update_v & "-->")))
|
updateApp.applescript
|
set update_dlURL to (item 1 of split(update_dlURL, ("\">")))
|
updateApp.applescript
|
set update_dlURL to (item 2 of split(update_dlURL, ("<a href=\""))) as string
|
updateApp.applescript
|
copy update_dlURL to thedownloadsite
|
updateApp.applescript
|
set title of button "downloadupdate" of window "updatewindow" to (localized string "DOWNLOAD_TEXT")
|
updateApp.applescript
|
end finishUpdateLoad
|
updateApp.applescript
|
on lastCheckForConnection()
|
updateApp.applescript
|
set bcs to (do shell script "ping -t4 -o google.com") as string
|
updateApp.applescript
|
common_displayDialog((localized string "NOTCONNECTED"), (localized string "OKAY_TEXT"), false, "")
|
updateApp.applescript
|
common_displayDialog((localized string "UPDATESITEDOWN"), (localized string "OKAY_TEXT"), false, "")
|
updateApp.applescript
|
end lastCheckForConnection
|
updateApp.applescript
|
on useOtherScript(scriptNameID)
|
updateApp.applescript
|
tell me
|
updateApp.applescript
|
set otherScript to POSIX file ((appsup & "Scripts/" & scriptNameID & ".scpt") as string)
|
updateApp.applescript
|
set otherScript to load script (otherScript)
|
updateApp.applescript
|
return otherScript
|
updateApp.applescript
|
end useOtherScript
|
updateApp.applescript
|
set question to display dialog "Width of document" default answer (170) buttons {"Avbryt", "OK"} default button "OK"
|
make_hardcover.applescript
|
set bredde to text returned of question
|
make_hardcover.applescript
|
set question to display dialog "Hight of document" default answer (240) buttons {"Avbryt", "OK"} default button "OK"
|
make_hardcover.applescript
|
set hoyde to text returned of question
|
make_hardcover.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.