text
stringlengths
0
15.7k
source
stringlengths
6
112
end envoieFactureAvecMail
AppDelegate copy 4.applescript
on envoieAvecMail(adresseExpediteur, listeDestinataires, sujetMessage, contenuMessage, listeAliasPJ, nomSignature, envoi)
AppDelegate copy 4.applescript
logToFileAndToConsole("----> Création du mail dans Mail")
AppDelegate copy 4.applescript
set messageVisible to true -- Obligatoire pour utiliser le GUI Scripting pour la signature
AppDelegate copy 4.applescript
set nouveauMessage to make new outgoing message with properties {sender:adresseExpediteur, subject:sujetMessage, visible:messageVisible, content:contenuMessage}
AppDelegate copy 4.applescript
repeat with adresseDestinataire in listeDestinataires
AppDelegate copy 4.applescript
make new recipient at end of to recipients with properties {address:adresseDestinataire}
AppDelegate copy 4.applescript
repeat with aliasPJ in listeAliasPJ
AppDelegate copy 4.applescript
make new attachment with properties {file name:aliasPJ} -- inséré à la fin du message
AppDelegate copy 4.applescript
tell current application to my ajouteSignatureDansMail(nomSignature)
AppDelegate copy 4.applescript
if envoi then
AppDelegate copy 4.applescript
tell current application to my logToFileAndToConsole("*** Envoi du mail ***")
AppDelegate copy 4.applescript
send nouveauMessage
AppDelegate copy 4.applescript
logToFileAndToConsole("<---- Création du mail dans Mail")
AppDelegate copy 4.applescript
end envoieAvecMail
AppDelegate copy 4.applescript
on ajouteSignatureDansMail(nomSignature)
AppDelegate copy 4.applescript
tell pop up button 2
AppDelegate copy 4.applescript
click menu item nomSignature of menu 1
AppDelegate copy 4.applescript
end ajouteSignatureDansMail
AppDelegate copy 4.applescript
local position
AppDelegate copy 4.applescript
set position to 0
AppDelegate copy 4.applescript
if item i of this_list is this_item then
AppDelegate copy 4.applescript
set position to i
AppDelegate copy 4.applescript
return position
AppDelegate copy 4.applescript
on getNumeroFacture(aliasDossierFactures)
AppDelegate copy 4.applescript
tell application "Finder" to set nomFichier to name of (last item of ((every file of folder aliasDossierFactures) as list))
AppDelegate copy 4.applescript
set numeroFacture to text 9 through 13 of nomFichier --> ex : "Facture_00471.pdf"
AppDelegate copy 4.applescript
return (numeroFacture as integer) + 1
AppDelegate copy 4.applescript
end getNumeroFacture
AppDelegate copy 4.applescript
on logToFile(ligne)
AppDelegate copy 4.applescript
set ligne to ligne & "\n"
AppDelegate copy 4.applescript
write ligne to referenceVersFichierLog starting at eof as «class utf8»
AppDelegate copy 4.applescript
end logToFile
AppDelegate copy 4.applescript
on logToFileAndToConsole(ligne)
AppDelegate copy 4.applescript
logToFile(ligne)
AppDelegate copy 4.applescript
log(ligne)
AppDelegate copy 4.applescript
end logToFileAndToConsole
AppDelegate copy 4.applescript
do script "" # create new window
make.applescript
tell application "Finder" of machine (get "eppc://192.168.2.7")
Script 12-2.applescript
get name of every Finder window
Script 12-2.applescript
write text argv as string
tab.txt
 on run {input, parameters}
Script 21-19.applescript
set file_list to input as list
Script 21-19.applescript
set dialog_reply to display dialog "Enter minimum file size in KB:" default answer "20"
Script 21-19.applescript
set min_size_in_kb to text returned of dialog_reply as number
Script 21-19.applescript
set filtered_files to {}
Script 21-19.applescript
repeat with file_ref in file_list
Script 21-19.applescript
if (size of file_ref) > (min_size_in_kb * 1024) then
Script 21-19.applescript
set end of filtered_files to contents of file_ref
Script 21-19.applescript
return filtered_files
Script 21-19.applescript
tell application "System Events" to tell process "App Store"
SwitchMacAppStoreAppleID.scpt
click menu item "Sign Out" of menu 1 of menu bar item "Store" of menu bar 1
SwitchMacAppStoreAppleID.scpt
click menu item "Sign In…" of menu "Store" of menu bar item "Store" of menu bar 1
SwitchMacAppStoreAppleID.scpt
repeat until exists sheet 1 of window 1
SwitchMacAppStoreAppleID.scpt
set value of text field "Apple ID:" of sheet 1 of window 1 to "YOUR APPLE ID"
SwitchMacAppStoreAppleID.scpt
click button "Sign In" of sheet 1 of window 1
SwitchMacAppStoreAppleID.scpt
set value of text field "Password:" of sheet 1 of window "App Store" to "YOUR APPLE ID PASSWORD"
SwitchMacAppStoreAppleID.scpt
tell application "VLC"
muted.applescript
muted
muted.applescript
set properties to {alignment:center, font:"Helvetica-Bold", underlined:false, size:24, color:{20000, 20000, 20000}, background:{65535, 65535, 65535}}
Header Main.applescript
tell application "Sublime Text"
open_sublime.applescript
tell application "System Events" to tell process "Visual Studio Code"
open_sublime.applescript
set position to {5, 490}
open_sublime.applescript
set size to {610, 530}
open_sublime.applescript
set names to the name of every pane
02-what-a-pane.applescript
set message to "The ids for System Preferences panes are:\n" & names
02-what-a-pane.applescript
display dialog message buttons {"OK"} default button "OK"
02-what-a-pane.applescript
tell application "Adobe Photoshop 2023"
Callout Fill.applescript
do action "Callout Fill" from "Roben Kleene"
Callout Fill.applescript
set uri to "https://github.com/"
on wget().applescript
on wget(uri)
on wget().applescript
set cmd to "wget -P " & quoted form of dir & " " & quoted form of uri
on wget().applescript
end wget
on wget().applescript
on replaceStringComponents(haystack, needle, replace)
stringHandlers.applescript
return combineComponents(separateComponents(haystack, needle), replace)
stringHandlers.applescript
end replaceStringComponents
stringHandlers.applescript
on separateStringComponents(str, sep)
stringHandlers.applescript
tell AppleScript
stringHandlers.applescript
set oldTIDs to text item delimiters
stringHandlers.applescript
set text item delimiters to sep
stringHandlers.applescript
set lst to every text item of str
stringHandlers.applescript
set text item delimiters to oldTIDs
stringHandlers.applescript
end separateStringComponents
stringHandlers.applescript
on combineStringComponents(lst, sep)
stringHandlers.applescript
set str to lst as string
stringHandlers.applescript
end combineStringComponents
stringHandlers.applescript
set myNotebook to notebook "Tulletts log"
evernote_create_logbooks copy.applescript
set tDate to short date string of (current date) as string
evernote_create_logbooks copy.applescript
set noteTitle to short date string of (current date) as string
evernote_create_logbooks copy.applescript
create note title noteTitle with text " " notebook myNotebook tags {"logbooks", "Tulletts"}
evernote_create_logbooks copy.applescript
delay 30
evernote_create_logbooks copy.applescript
tell window "History"
autofocus-safari-history-search.applescript
tell splitter group 1
autofocus-safari-history-search.applescript
tell group 1 of tab group 1
autofocus-safari-history-search.applescript
set focused of text field 1 to true
autofocus-safari-history-search.applescript
set default_area_code to "201"
Script 14-9.applescript
set phone_list to {"204-5556145", "5559132", "5557040", "307-5551437", "5556421"}
Script 14-9.applescript
repeat with phone_ref in phone_list
Script 14-9.applescript
if length of phone_ref is 7 then
Script 14-9.applescript
set contents of phone_ref to default_area_code & "-" & phone_ref
Script 14-9.applescript