- français
- English
myPrint scripts
Création des AppleScript pour myPrint
Guide de l’utilisateur d’Éditeur de script Mac Automation Scripting Guide 📃 Scripts myPrint (anciens) |
1️⃣ Ouvrir l'application Script Editor
2️⃣ Créer un nouveau document et y coller le shell script
3️⃣ Exporter le script sous forme de Application signée
🔑 Le certificat Apple développeur doit avoir été chargé dans le Trousseau de clés depuis Xcode (J8A6UP2TFJ)
Nouveaux scripts édition 2022
1️⃣ SecurePrintStudent1 🇫🇷
set {text returned:gaspar} to display dialog "Installation de la file SecurePrint
Saisissez votre nom (username) GASPAR" buttons {"Annuler", "Installer"} default answer "" default button "Installer"
Saisissez votre nom (username) GASPAR" buttons {"Annuler", "Installer"} default answer "" default button "Installer"
do shell script "cd /tmp; curl -o /tmp/PPD-C5860-color-FR.PPD https://printepfl.epfl.ch/PPD-C5860-color-FR.PPD; lpadmin -p SecurePrint1Mac-" & gaspar & " -E -v lpd://" & gaspar & "@printepfl1.epfl.ch/SecurePrint-Color -P '/tmp/PPD-C5860-color-FR.PPD' -o printer-is-shared=false -L EPFL -o PageSize=A4 -o Duplex=DuplexNoTumble -u allow:all -o auth-info-required=username,password"
display notification "La file d'impression SecurePrint est installée"
delay 1 --> allow time for the notification to trigger
2️⃣ SecurePrintStaff2 🇫🇷
set {text returned:gaspar} to display dialog "Installation de la file SecurePrint
Saisissez votre nom (username) GASPAR" buttons {"Annuler", "Installer"} default answer "" default button "Installer"
Saisissez votre nom (username) GASPAR" buttons {"Annuler", "Installer"} default answer "" default button "Installer"
do shell script "cd /tmp; curl -o /tmp/PPD-C5860-color-FR.PPD https://printepfl.epfl.ch/PPD-C5860-color-FR.PPD; lpadmin -p SecurePrint2Mac-" & gaspar & " -E -v lpd://" & gaspar & "@printepfl2.epfl.ch/SecurePrint-Color -P '/tmp/PPD-C5860-color-FR.PPD' -o printer-is-shared=false -L EPFL -o PageSize=A4 -o Duplex=DuplexNoTumble -u allow:all -o auth-info-required=username,password"
display notification "La file d'impression SecurePrint est installée"
delay 1 --> allow time for the notification to trigger
4️⃣ SecurePrintStudent4En 🇬🇧
set {text returned:gaspar} to display dialog "Installing the SecurePrint Queue
Enter your GASPAR username" buttons {"Cancel", "Install"} default answer "" default button "Install"
Enter your GASPAR username" buttons {"Cancel", "Install"} default answer "" default button "Install"
do shell script "cd /tmp; curl -o /tmp/PPD-C5860-color-EN.PPD https://printepfl.epfl.ch/PPD-C5860-color-EN.PPD; lpadmin -p SecurePrint4Mac-" & gaspar & " -E -v lpd://" & gaspar & "@printepfl4.epfl.ch/SecurePrint-Color -P '/tmp/PPD-C5860-color-EN.PPD' -o printer-is-shared=false -L EPFL -o PageSize=A4 -o Duplex=DuplexNoTumble -u allow:all -o auth-info-required=username,password"
display notification "The SecurePrint print queue is installed"
delay 1 --> allow time for the notification to trigger
5️⃣ SecurePrintStaff5En 🇬🇧
set {text returned:gaspar} to display dialog "Installing the SecurePrint Queue
Enter your GASPAR username" buttons {"Cancel", "Install"} default answer "" default button "Install"
Enter your GASPAR username" buttons {"Cancel", "Install"} default answer "" default button "Install"
do shell script "cd /tmp; curl -o /tmp/PPD-C5860-color-EN.PPD https://printepfl.epfl.ch/PPD-C5860-color-EN.PPD; lpadmin -p SecurePrint5Mac-" & gaspar & " -E -v lpd://" & gaspar & "@printepfl5.epfl.ch/SecurePrint-Color -P '/tmp/PPD-C5860-color-EN.PPD' -o printer-is-shared=false -L EPFL -o PageSize=A4 -o Duplex=DuplexNoTumble -u allow:all -o auth-info-required=username,password"
display notification "The SecurePrint print queue is installed"
delay 1 --> allow time for the notification to trigger
2.02.2022