• 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: Slow app with Fusion drive.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow app with Fusion drive.


  • Subject: Re: Slow app with Fusion drive.
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 13 Mar 2013 16:01:28 +1100

G'day Shane.

My latest effort is trying to replace this routine, but I've spent hours reading the documentation, and can't work out what to do.

We often get files without extensions, and need to add them. Any advice please

Regards

Santa


on AttachmentsPrintCycleThree(holding_folder_temp) --Add attachment name extensions
    set tt to current date
    try
        set theTempList to {}
        try
            set posixPath to POSIX path of ((holding_folder_temp as text) as alias)
            set theTempList to my urlsInFolder_(posixPath)
             -- set theTempList to (get every file of holding_folder_temp) as alias list # altered
            if RunForOz then say (("Attach cycle 3.1 ," & ((current date) - tt)) as text) # 5 seconds, 2 seconds
on error
            set theTempList to {}
        end try
        tell application "Finder"
            if the name of holding_folder_temp = "Links" then
                set parent_Folder to container of holding_folder_temp
                set t to ((every file of parent_Folder whose name extension = "indd") as alias list) # altered
                if (count of t) > 0 then set theTempList to {}
            end if
        end tell
        if (count of theTempList) ≠ 0 then
            repeat with theFile in theTempList
                try
                    try
                        set oneFile to theFile's getPathComponent() # Doesn't work.
                        on error errmsg
                        display dialog "oneFile 3 " & errmsg
                        end try
                    1
                    tell application "Finder"
                        set {creator type:CT, name extension:NE, kind:KI, name:NA} to oneFile
                        if (NE is missing value or NE = "") then
                            if CT = "InDn" then
                                try
                                    set name of oneFile to (NA & ".indd")
                                end try
                            end if
                            if CT = "XPR3" then
                                try
                                    set name of oneFile to (NA & ".qxp")
                                end try
                            end if
                            if KI = "Rich Text Format (RTF)" then
                                try
                                    set name of oneFile to (NA & ".rtf")
                                end try
                            end if
                            if KI = "RTF with attachments (RTFD)" then
                                try
                                    set name of oneFile to (NA & ".rtfd")
                                end try
                            end if
                            if KI = "Unix Executable File" then
                                try
                                    set name of oneFile to (NA & ".eps")
                                end try
                            end if
                        end if
                    end tell
on error errmsg
                    display dialog "Att print 3 " & errmsg
                end try
            end repeat
            set OnlyPrintIndandQuarkflag to false
            tell application "Finder"
                set TempList to (get every file of holding_folder_temp) as alias list # altered
                repeat with oneFile in TempList
                    try
                        if name extension of oneFile is in {"indd", "inx", "qxp", "qxd"} then
                            set OnlyPrintIndandQuarkflag to true
                            exit repeat
                        end if
                    end try
                end repeat
            end tell
        end if
on error theerror number errNum
        tell application "Finder" to activate
        if errNum ≠ -1728 and errNum ≠ -10006 then display dialog " AttachmentsPrintCycleThree " & return & "Error number " & errNum & return & theerror as text giving up after 5
    end try
    if RunForOz then say (("Attach cycle 3 ," & ((current date) - tt)) as text) # 42 seconds
    my AttachmentsPrintCycleFour(holding_folder_temp as alias)
end AttachmentsPrintCycleThree

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Slow app with Fusion drive.
      • From: Shane Stanley <email@hidden>
References: 
 >Slow app with Fusion drive. (From: Brian Christmas <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Shane Stanley <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Brian Christmas <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Shane Stanley <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Brian Christmas <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Shane Stanley <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Brian Christmas <email@hidden>)
 >Re: Slow app with Fusion drive. (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: how to assign a version to an apple script
  • Next by Date: Re: Slow app with Fusion drive.
  • Previous by thread: Re: Slow app with Fusion drive.
  • Next by thread: Re: Slow app with Fusion drive.
  • Index(es):
    • Date
    • Thread