Archives actuelles avec moteur de recherche
N'hésitez pas à vous inscrire à la liste : http://listes.patpro.net/mailman/listinfo/applescript_fr

Apple, AppleScript, AppleScript Studio, AppleTalk, AppleWorks, ColorSync, Finder, HyperCard, iBook, iLife, iMac, iWork, Keynote, Mac, Macintosh, Mac OS, Pages, Panther, PowerBook, Power Mac, Power Macintosh, QuickTime, Safari, Tiger, Xcode sont des marques déposées par Apple Computer, Inc., enregistrées aux Etats-Unis et dans les autres pays. Liste officielle

De : (Liste AppleScript francophone) <applescript_fr@xxxxxxx.net>
À : "(Liste AppleScript francophone)" <applescript_fr@xxxxxxx.net>
Date : dimanche 18 février 2001 6:00
Objet : applescript_fr Digest #125

        Liste AppleScript francophone Digest #125

 1) Fermer une fenêtre (suite)
    by VDOUCE <vdouce@xxxxxxx.com>
 2) archives de la liste
    by patpro <patpro@xxxxxxx.net>






De : VDOUCE <vdouce@xxxxxxx.com> Date : : Sat, 17 Feb 2001 08:17:04 +0000 Objet : [AS] Fermer une fenêtre (suite) tell application "Editeur de Texte Scriptable" close window "papillon" saving yes end tell tell application "Editeur de Texte Scriptable" close saving in file "papillon" end tell tell application "Editeur de Texte Scriptable" close file "papillon" saving yes end tell quelle est la différence théorique entre les trois formulations ? AW6 obéit parfaitement au second script, mais pas au premier ni au troisième. Simpletext n'est-elle pas scriptable ? Elle répond "window "papillon" ne comprend pas le message close" ou bien "impossible de continuer après "close"".

De : patpro <patpro@xxxxxxx.net> Date : Sun, 18 Feb 2001 00:39:54 +0100 Objet : [AS] archives de la liste Salut, j'ai remis un peu les archives de la liste en ordre, c'est toujours ici : http://www.patpro.net/as/dl/archive_liste/ Je les ai converties en HTML grace a un script, et j'ai aussi lié l'index de début de chaque digest aux messages correspondants dans le corps du digest. pour les intéressés voici ce script (utilise BBEdit 6.0 et les RegExp de maniere intensive, je suis particulièrement peu fier de la partie "traduction de contenu", c'est hum... crade.) : [script] property HTML_HEADER : "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\"> <html lang=\"fr\"> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\"> <title>archive AppleScript_fr</title> </head> <body> <pre> " property BODY : " <!-- ici le texte --> " property HTML_FOOTER : " </pre> </body> </html> " set MonFolder to (choose folder) as string set MaListe to list folder MonFolder tell application "BBEdit 6.0" repeat with i in MaListe if "icon" is not in i then open file (MonFolder & i) ------------------------------- -- cut les mails set s_options to {search mode:grep, ¬ starting at top:true, ¬ wrap around:false, ¬ reverse:false, ¬ case sensitive:true, ¬ match words:false, ¬ extend selection:false} replace "([^\\t \\(<]+)@([^\\.\\r ]+)(\\.[^\\t >\\r\\)]+)" ¬ using ("\\1@xxxxxxx\\3") ¬ searching in text window 1 ¬ options s_options ------------------------------- -- traduction du contenu translate text to html with entity conversion ¬ without ignore angle brackets and create new document activate select text 1 of text window 1 cut selection set text 1 of text window 1 to HTML_HEADER & BODY & HTML_FOOTER find BODY searching in selection with selecting match paste ------------------------------- -- épure texte + html set s_options to {search mode:grep, ¬ starting at top:true, ¬ wrap around:false, ¬ reverse:false, ¬ case sensitive:true, ¬ match words:false, ¬ extend selection:false} set MonFind to ¬ (replace "(^ ?)(##?)(\\) )([^\\r]+)(\\r[\\t ]+by)" ¬ using ("<b>\\1\\2\\3</b><a href=\"#\\2\">\\4</a>\\5") ¬ searching in text window 1 options s_options) -- attention ici au formatage imposé par le mail ici set s_text to ¬ "(^\\r)([-]+\\r\\rDate: ¬ |[-]+\\r\\rMessage-I|[-]+\\r\\rFrom: ¬ |[-]+\\r\\rSubject: |De : )" set s_options to {search mode:grep, ¬ starting at top:true, ¬ wrap around:false, ¬ reverse:false, ¬ case sensitive:true, ¬ match words:false, ¬ extend selection:false} repeat with j from 1 to MonFind if found of ¬ (find s_text searching in text window 1 ¬ options s_options with selecting match) then set r_text to ("\\1<br><br><a id=\"" & ¬ j & "\" name=\"" & j & "\"></a>\r\\2") set selection of window 1 to grep substitution of r_text else -- erreur, marquer le fichier en cause. beep tell application "Finder" set label index of file (MonFolder & i) to 1 end tell end if end repeat replace "(^)(De|Date|Objet)( : )" ¬ using ("\\1<b>\\2\\3</b>") ¬ searching in text window 1 options s_options replace "(^)(Date: |Subject: |From: )" ¬ using ("\\1<b>\\2</b>") searching in text window 1 ¬ options s_options close window 1 saving yes end if end repeat end tell [/script] -- "Rien ne se perd, rien ne se crée, tout s'empile" - Mon Bureau -