• 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
re: Network / AS query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Network / AS query


  • Subject: re: Network / AS query
  • From: email@hidden
  • Date: Fri, 26 Nov 2004 16:29:11 -0000

Title: re: Network / AS query

Hi Kai / Simon,

sorry for the delay in acknowledging your contributions - just didn't want to flood the list with 'thank-you's' until I had finished it...!

For the reference of the list, I replaced the following code (to find a file in nested folders, which worked fine in OS9, but not well at all in OSX):

=== bad code (!) ===
tell application "Finder" to set FolderList to get the name of every folder of folder jtServerPath
        repeat with thisFolder in FolderList
                set thisSubFolder to jtServerPath & ":" & thisFolder as string
                try
                        tell application "Finder" to set filelist to (get the name of every file of folder thisSubFolder whose name = (jimmyVar & ".jt")) as list

                        repeat with thisFileName in filelist
                                set thisPath to (thisSubFolder as string) & ":" & thisFileName as string
                        end repeat
                end try
        end repeat
                               
set jobTicketPath to thisPath
=====================

with the following, which is dramatically quicker:

=== good code (!) ===
set n to jimmyVar & ".jt"
try
        tell application "Finder" to repeat with f in (get folder jtServerPath's folders)
                if exists f's file n then set jobTicketPath to (f as string) & n
        end repeat
end try
======================

So, all is good once more.  Thanks again for your assistance!

James

--
Technical Adviser - Global CMS Project
+44 (20) 8652 3917
Reed Business Information



r============================ DISCLAIMER =============================
This message is intended only for the use of the person(s)
(\"Intended Recipient\") to whom it is addressed. It may contain
information, which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.

Reed Business Information Ltd. and its subsidiary companies
Tel: +44 (0)20 8652 3500

=======================================================================

 _______________________________________________
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: Network / AS query
      • From: kai <email@hidden>
  • Prev by Date: Re: Call PHP to Access Remoter MySQL DB with AppleScript?
  • Next by Date: Re: Quark Facing Pages
  • Previous by thread: Re: setting input focus to a text field (ASS)
  • Next by thread: Re: Network / AS query
  • Index(es):
    • Date
    • Thread