text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set nextVariant to variant before v | select_previous_variants.applescript |
set MyList to (name of every process) | Spotify - Play-Pause.scpt |
if (MyList contains "Spotify") is true then | Spotify - Play-Pause.scpt |
to makeCombobox at origin given width:width : 200, itemList:itemList : {}, placeholder:placeholder : "", lineBreakMode:lineBreakMode : 5, tag:tag : missing value, action:action : "comboAction:", target:target : missing value | NSComboBox.applescript |
tell (current application's NSComboBox's alloc()'s initWithFrame:{origin, {width, 25}}) | NSComboBox.applescript |
its setLineBreakMode:lineBreakMode -- 0-5 or enum | NSComboBox.applescript |
its addItemsWithObjectValues:(itemList as list) | NSComboBox.applescript |
its setCompletes:true -- autocomplete | NSComboBox.applescript |
if placeholder is not in {"", missing value} then its setPlaceholderString:(placeholder as text) | NSComboBox.applescript |
if width is in {0, missing value} then its sizeToFit() -- set width to the placeholder | NSComboBox.applescript |
end makeCombobox | NSComboBox.applescript |
on comboAction:sender | NSComboBox.applescript |
display dialog "The selected combobox item is " & quoted form of ((sender's stringValue) as text) buttons {"OK"} default button 1 giving up after 5 | NSComboBox.applescript |
end comboAction: | NSComboBox.applescript |
global gAtc, gBtc, xClick, yClick, xStartMAutoInsert, yStartMAutoInsert, xStartMAutoSuite, yStartMAutoSuite, xStartRX6Denoise, yStartRX6Denoise | RESTORE_SETTINGS_of_PT10.applescript |
if value of button 13 of toolbar 3 of window 1 = "Selected" then | RESTORE_SETTINGS_of_PT10.applescript |
click button 13 of toolbar 3 of window 1 | RESTORE_SETTINGS_of_PT10.applescript |
if value of button 7 of toolbar 1 of toolbar 6 of window 1 = "loop" then | RESTORE_SETTINGS_of_PT10.applescript |
key code 37 using {shift down, command down} -- shift,cmd+L | RESTORE_SETTINGS_of_PT10.applescript |
display dialog "Restore settings done!" | RESTORE_SETTINGS_of_PT10.applescript |
on clickMouse() | RESTORE_SETTINGS_of_PT10.applescript |
set mouseToolsPath to (path to home folder as text) & "UnixBins:MouseTools" | RESTORE_SETTINGS_of_PT10.applescript |
set x to xClick | RESTORE_SETTINGS_of_PT10.applescript |
set y to yClick | RESTORE_SETTINGS_of_PT10.applescript |
do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (x as text) & " -y " & (y as text) & " -mouseSteps 200" | RESTORE_SETTINGS_of_PT10.applescript |
do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (x as text) & " -y " & (y as text) & " -leftClickNoRelease" | RESTORE_SETTINGS_of_PT10.applescript |
do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (x as text) & " -y " & (y as text) & " -releaseMouse" | RESTORE_SETTINGS_of_PT10.applescript |
end clickMouse | RESTORE_SETTINGS_of_PT10.applescript |
openDocumentInDefaultApplication() | Open Document in Default Application.applescript |
on openDocumentInDefaultApplication() | Open Document in Default Application.applescript |
set theFile to POSIX file thePath | Open Document in Default Application.applescript |
end openDocumentInDefaultApplication | Open Document in Default Application.applescript |
set msgList to current messages | Move2Archive.applescript |
if msgList = {} then | Move2Archive.applescript |
error "No messages selected. Select at least one message." | Move2Archive.applescript |
set theMsg to item 1 of msgList | Move2Archive.applescript |
set theAccount to account of theMsg | Move2Archive.applescript |
set archiveFolder to folder "Archive" of on my computer | Move2Archive.applescript |
repeat with aMessage in msgList | Move2Archive.applescript |
move aMessage to archiveFolder | Move2Archive.applescript |
if id of aMessage = id of (object of aWindow) then | Move2Archive.applescript |
close aWindow | Move2Archive.applescript |
set query_text to "SELECT first_name, last_name FROM contact_table" | Script 25-12.applescript |
set the_result to sql_query_select(query_text) | Script 25-12.applescript |
on sql_query_select(query_text) | Script 25-12.applescript |
set rs to do query query_text results as none with prefetching results | Script 25-12.applescript |
set the_data to values of every row of rs | Script 25-12.applescript |
end sql_query_select | Script 25-12.applescript |
"a" is less than "b" | "a" is less than "b".applescript |
on open droppedFiles | Email%20App.net%20Links.scpt |
if number of droppedFiles is 1 then | Email%20App.net%20Links.scpt |
set userInfo to "Uploading " & name of (info for first item of droppedFiles) & " to App.net…" | Email%20App.net%20Links.scpt |
set userInfo to "Uploading " & number of droppedFiles & " files to App.net…" | Email%20App.net%20Links.scpt |
display notification userInfo -- This is the only line in this script that requires 10.9 | Email%20App.net%20Links.scpt |
tell application "FileBase" | Email%20App.net%20Links.scpt |
set newUploads to (upload droppedFiles public yes) | Email%20App.net%20Links.scpt |
set links to return & return -- Initialize a string with two newlines in it | Email%20App.net%20Links.scpt |
repeat with anUpload in newUploads | Email%20App.net%20Links.scpt |
set links to (links & short URL of anUpload & return) | Email%20App.net%20Links.scpt |
make outgoing message with properties {content:links, visible:true} | Email%20App.net%20Links.scpt |
activate -- brings mail to the front | Email%20App.net%20Links.scpt |
choose file with prompt "Pick a file to email via App.net file storage:" | Email%20App.net%20Links.scpt |
open {result} | Email%20App.net%20Links.scpt |
property desktopWidth : 0 | get-desktopsize.scpt |
property desktopHeight : 0 | get-desktopsize.scpt |
set desktopSize to bounds of window of desktop | get-desktopsize.scpt |
set desktopWidth to item 3 of desktopSize | get-desktopsize.scpt |
set desktopHeight to item 4 of desktopSize | get-desktopsize.scpt |
return "desktop width=" & desktopWidth & ", desktop height=" & desktopHeight | get-desktopsize.scpt |
set originalDelimiter to AppleScript's text item delimiters | whatsapp_abid.scpt |
set db_path to (do shell script "find ~/Library/Mobile\\ Documents/*WhatsApp/Accounts/*/* -maxdepth 1 -type f | grep ChatStorage.sqlite") | whatsapp_abid.scpt |
set AppleScript's text item delimiters to ASCII character 13 # \r | whatsapp_abid.scpt |
set dbs to every text item of db_path | whatsapp_abid.scpt |
if (count of dbs) > 1 then | whatsapp_abid.scpt |
repeat with db in dbs | whatsapp_abid.scpt |
display dialog "More than one Whatsapp account were found in your iCloud folder." & linefeed & linefeed & "Click Select to choose: " & linefeed & db & linefeed & linefeed & "Click Next to see the next database" buttons {"Select", "Next", "Cancel"} default button "Select" | whatsapp_abid.scpt |
if button returned of the result = "Select" then | whatsapp_abid.scpt |
set db_path to contents of db | whatsapp_abid.scpt |
set loc to space & quoted form of db_path & space | whatsapp_abid.scpt |
set head to "sqlite3" & loc & quote | whatsapp_abid.scpt |
set tail to quote | whatsapp_abid.scpt |
set query to "select ZCONTACTABID, ZCONTACTJID, ZPARTNERNAME from ZWACHATSESSION where ZCONTACTABID != 0;" | whatsapp_abid.scpt |
set rows to do shell script head & query & tail | whatsapp_abid.scpt |
set rowsArray to every text item of rows | whatsapp_abid.scpt |
repeat with row in rowsArray | whatsapp_abid.scpt |
set {abid, whatsappID, contactName} to every text item of row | whatsapp_abid.scpt |
set thePeople to (every person whose name = contactName) | whatsapp_abid.scpt |
if (count of thePeople) > 1 then | whatsapp_abid.scpt |
display dialog "More than one person in your Address Book are named: " & contactName & linefeed & linefeed & "The whatsapp address we're looking for is: " & whatsappID & linefeed & linefeed & "Does it match with any of these phone numbers?" & linefeed & linefeed & value of every phone of aPerson & linefeed & linefeed &... | whatsapp_abid.scpt |
set thePerson to contents of aPerson | whatsapp_abid.scpt |
else if (count of thePeople) = 1 then | whatsapp_abid.scpt |
set thePerson to first item of thePeople | whatsapp_abid.scpt |
set existingWhatsappSocialProfiles to (every social profile of thePerson whose service name is "Whatsapp") | whatsapp_abid.scpt |
if (count of existingWhatsappSocialProfiles) > 0 then | whatsapp_abid.scpt |
repeat with existingWhatsappSocialProfile in existingWhatsappSocialProfiles | whatsapp_abid.scpt |
set user identifier of existingWhatsappSocialProfile to abid | whatsapp_abid.scpt |
set user name of existingWhatsappSocialProfile to "✅ " & contactName | whatsapp_abid.scpt |
set url of existingWhatsappSocialProfile to "whatsapp://send?abid=" & abid | whatsapp_abid.scpt |
make new social profile at end of every social profile of thePerson with properties {user identifier:abid, user name:"✅ " & contactName, service name:"Whatsapp", url:"whatsapp://send?abid=" & abid} | whatsapp_abid.scpt |
save thePerson | whatsapp_abid.scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.