• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Timeout on panther
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Timeout on panther


  • Subject: Timeout on panther
  • From: Adrien FRANCOIS <email@hidden>
  • Date: Tue, 31 May 2005 09:15:04 +0200

Title: Timeout on panther
Hye, here is a simple script where the timeout doesn’t work (no wait).
Could you explain me what does not go, please ?
I want that the script wait 5 seconds before to print the following file.

Thanks


tell application "Finder" -- fait appel à l'application Finder
   
    set the source_folder to path to current user folder as alias -- définit le home user
   
    set liste_des_fichiers to folder "testpdf" of folder "Documents" of source_folder -- définit le répertoire de travail
   
    repeat with un_fichier in liste_des_fichiers -- boucle de conversion pour chaque fichier
       with timeout of 5 seconds
           set extension hidden of un_fichier to true -- afficher extension cachée
           set name_i to displayed name of un_fichier as text -- Le nom visible contient l'extension si cette dernière n'est pas cachée
           set ext_i to name extension of un_fichier -- Vide "" si pas d'extension
           set locked_i to locked of un_fichier -- variable de verrouillage du fichier
           if (locked_i is false) and (ext_i is "cwk") then set name of un_fichier to name_i -- On enlève l'extension du nom
           -- Il y aura un problème si un fichier existe avec ce même nom mais sans l'extension
           -- Si on opére sur un seul fichier d'un dossier ne contenant que ce fichier :  Toto.txt, le script
           -- nous dira qu'il existe un fichier  Toto  (seul sans extension), alors qu'il n'en existe pas.
           -- L'instruction  exists  fait donc l'amalgame entre les noms de fichiers avec et sans extensions
           
            if locked_i is true then set alert_lock to true
           
            print un_fichier
       end timeout
   end repeat
   
end tell


--
Adrien FRANCOIS

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Timeout on panther
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: [ANN] Tiger compatible version of Script Timer available
  • Next by Date: Re: Timeout on panther
  • Previous by thread: [ANN] Tiger compatible version of Script Timer available
  • Next by thread: Re: Timeout on panther
  • Index(es):
    • Date
    • Thread