text
stringlengths
0
15.7k
source
stringlengths
6
112
set the contents of text view 1 of scroll view 1 of view 1 of split view 1 of window "conversationWindow" to (myConversationData & (ASCII character 10) & myAddedConversationData)
audiMate.applescript
if myConvoAction is not "Reply" then
audiMate.applescript
set the title of window "homeWindow" to "Home"
audiMate.applescript
load_userConversations(myLoginAlias)
audiMate.applescript
end updateConversation
audiMate.applescript
on updatePortrait(myPortraitPath, outputWindow)
audiMate.applescript
set myPortraitSize to (size of (info for myPortraitPath))
audiMate.applescript
if myPortraitSize is less than 151000 then
audiMate.applescript
if getFileType(myPortraitPath) is "JPEG image" then
audiMate.applescript
set myPortraitURL to (homeRootURL & "updatePortrait.php") as string
audiMate.applescript
set myPortrait to ("curl --form-string " & quoted form of ("email=" & myLoginEmail) & " --form-string " & quoted form of ("password=" & myLoginPassword) & " --form " & quoted form of ("fileUpload=@" & myPortraitPath) & " --form press=OK" & " -e 'audiMate.updatePortrait' " & quoted form of (myPortraitURL))
audiMate.applescript
set myPortrait to (do shell script myPortrait)
audiMate.applescript
if myPortrait is "0" then
audiMate.applescript
display alert "Error: something went wrong with the upload." attached to window "homeWindow"
audiMate.applescript
else if myPortrait ends with "is a user but does not exist in portraits." then
audiMate.applescript
display alert myPortrait attached to window "homeWindow"
audiMate.applescript
load_portrait(myLoginAlias, outputWindow)
audiMate.applescript
display alert "Error: only JPEGs are supported." attached to window "homeWindow"
audiMate.applescript
display alert "Error: your portrait must be less than 150KB." attached to window "homeWindow"
audiMate.applescript
end updatePortrait
audiMate.applescript
on display_userProfile(chosenAlias)
audiMate.applescript
if chosenAlias is not "" then
audiMate.applescript
set myProfileData to getMyDetails(chosenAlias)
audiMate.applescript
if myProfileData is "0" then
audiMate.applescript
display alert "This user does not exist." attached to window "homeWindow"
audiMate.applescript
set myProfileData_location to item 2 of (split(myProfileData, "<--userLocation-->")) as string
audiMate.applescript
set myProfileData_gender to item 2 of (split(myProfileData, "<--userGender-->")) as string
audiMate.applescript
copy chosenAlias to myProfileData_alias
audiMate.applescript
set title of window "homeWindow" to (myProfileData_alias & "'s profile") as string
audiMate.applescript
tell window "profileWindow"
audiMate.applescript
set contents of text field "profileLocationText" to ((myProfileData_location) as string)
audiMate.applescript
set contents of text field "profileGenderText" to ((myProfileData_gender) as string)
audiMate.applescript
load_portrait(chosenAlias, "profileWindow")
audiMate.applescript
load_userTracks(chosenAlias, "profileWindow")
audiMate.applescript
copy myProfileData_alias to myMate_alias
audiMate.applescript
if (count myMates) is equal to myMatesCount then
audiMate.applescript
set the title of button "profileRememberForgetButton" of window "profileWindow" to "Remember"
audiMate.applescript
set the title of button "profileRememberForgetButton" of window "profileWindow" to "Forget"
audiMate.applescript
display panel window "profileWindow" attached to window "homeWindow"
audiMate.applescript
end display_userProfile
audiMate.applescript
on load_userConversations(theGivenAlias)
audiMate.applescript
set myConversationsURL to (homeRootURL & "getMyConversations.php") as string
audiMate.applescript
set myConversationsCURL to ("curl --data-urlencode " & quoted form of ("alias=" & theGivenAlias) & " -e 'audiMate.getMyConversations' " & quoted form of (myConversationsURL)) as string
audiMate.applescript
set myConversationsCURLed to (do shell script (myConversationsCURL)) as string
audiMate.applescript
if myConversationsCURLed is "0" then
audiMate.applescript
set myConversations_dbTemp to {}
audiMate.applescript
set myConversations_dbTemp to every paragraph of myConversationsCURLed
audiMate.applescript
set myConversations_time to {}
audiMate.applescript
set myConversations_alias to {}
audiMate.applescript
set myConversations_deleted to {}
audiMate.applescript
repeat until myConversations_dbTemp is {}
audiMate.applescript
set myConversations_time to myConversations_time & (item 1 of myConversations_dbTemp)
audiMate.applescript
set myConversations_dbTemp to rest of myConversations_dbTemp
audiMate.applescript
set myConversations_alias to myConversations_alias & (item 1 of myConversations_dbTemp)
audiMate.applescript
set myConversations_deleted to myConversations_deleted & (item 1 of myConversations_dbTemp)
audiMate.applescript
delete data source conversationsTab_DataSource
audiMate.applescript
set conversationsTab_DataSource to make new data source at end of data sources
audiMate.applescript
tell conversationsTab_DataSource
audiMate.applescript
make new data column at end of data columns with properties {name:"lastActivity", sort order:ascending, sort type:alphabetical, sort case sensitivity:case sensitive}
audiMate.applescript
make new data column at end of data columns with properties {name:"alias", sort order:ascending, sort type:alphabetical, sort case sensitivity:case sensitive}
audiMate.applescript
set data source of (table view 1 of scroll view 1 of tab view item "conversationsTab" of tab view 1 of window "homeWindow") to conversationsTab_DataSource
audiMate.applescript
set myDataRowser to 0
audiMate.applescript
repeat with myRepeatVar from 1 to (count myConversations_time)
audiMate.applescript
set myDataRowser to (myDataRowser + 1)
audiMate.applescript
if (item myRepeatVar of myConversations_deleted as string) is not myLoginAlias then
audiMate.applescript
set contents of data cell "lastActivity" of data row myDataRowser to (item myRepeatVar of myConversations_time as string)
audiMate.applescript
set contents of data cell "alias" of data row myDataRowser to (item myRepeatVar of myConversations_alias as string)
audiMate.applescript
set myDataRowser to (myDataRowser - 1)
audiMate.applescript
end load_userConversations
audiMate.applescript
on display_conversation(chosenAlias)
audiMate.applescript
set the contents of text view 1 of scroll view 1 of view 1 of split view 1 of window "conversationWindow" to myConversationData
audiMate.applescript
set myProfileData_location to ""
audiMate.applescript
set myProfileData_gender to ""
audiMate.applescript
tell window "conversationWindow"
audiMate.applescript
set contents of text field "conversationLocationText" to ((myProfileData_location) as string)
audiMate.applescript
set contents of text field "conversationGenderText" to ((myProfileData_gender) as string)
audiMate.applescript
load_portrait(chosenAlias, "conversationWindow")
audiMate.applescript
set title of window "homeWindow" to ("Conversation with " & chosenAlias) as string
audiMate.applescript
display panel window "conversationWindow" attached to window "homeWindow"
audiMate.applescript
end display_conversation
audiMate.applescript
set visible of view "soundbitePreview" of window "profileWindow" to true
audiMate.applescript
set visible of view "soundbitePreview" of window "profileWindow" to false
audiMate.applescript
set content of text field "soundbiteErrorText" of window "profileWindow" to "Playing"
audiMate.applescript
set content of text field "soundbiteErrorText" of window "profileWindow" to ""
audiMate.applescript
on display_conversation_head(chosenAlias)
audiMate.applescript
set myConversationURL to (homeRootURL & "displayConversation.php") as string
audiMate.applescript
set myConversationData to (do shell script ("curl --data " & quoted form of ("alias=" & myLoginAlias) & " --data " & quoted form of ("otherAlias=" & chosenAlias) & " -e 'audiMate.displayConversation' " & quoted form of myConversationURL)) as string
audiMate.applescript
set myConversationData_l to split(myConversationData, "<--StrtMssg_{" & myLoginAlias & "}:{" & chosenAlias & "}.[")
audiMate.applescript
set myConversationData_l_count to (count myConversationData_l)
audiMate.applescript
set myConversationData_l to split(((item 2 of myConversationData_l) as string), "]-->")
audiMate.applescript
if (myConversationData_l_count) is greater than 2 then
audiMate.applescript
set enabled of button "conversationReplyButton" of window "conversationWindow" to false
audiMate.applescript
set enabled of button "conversationReplyButton" of window "conversationWindow" to true
audiMate.applescript
set myConversationID to item 1 of myConversationData_l as string
audiMate.applescript
set myConversationData to item 2 of myConversationData_l as string
audiMate.applescript
return myConversationData
audiMate.applescript
end display_conversation_head
audiMate.applescript
on getMyDetails(chosenAlias)
audiMate.applescript
on updateMePlusLaunch()
audiMate.applescript
set otherScript to useOtherScript("updateApp")
audiMate.applescript