Folder action kicks in too early

I have a little applescript that is to add all files that are added to a specific folder to an iTunes playlist.
I added the script as a folder action to the folder.
It seems to work fine with single files.
However, when I copy several files (which takes a few seconds), then the script gets started too early, i.e., when only half of the files have been copied over. Consequently, only some of the files get added to the playlist.
In addition, when I copy a large number of files, it doesn't seem to work at all.
Any ideas what's wrong? or what I can do?
(Is this a bug in Mac OS? I read about an issue in 10.5 where folder actions got started before a single files was finished copying, but I haven't seen of any hints about my problem.)
Any kind of help will be highly appreciated.
Best regards,
Gabriel.
PS:
Here is my script, for completeness
Automatically add the files that are dropped on this applescript to
playlist named below.
To adapt it for a different playlist, just change the name below and save as application.
In addition, you can add this script as a folder action
Author: Gabriel Zachmann, Feb 2010
property playListName : "Hoerspiele"
on open theseFiles
addTheFiles(theseFiles)
end open
on adding folder items to this_folder after receiving added_items
addTheFiles(added_items)
end adding folder items to
to addTheFiles(theFiles)
tell application id "com.apple.iTunes"
activate
set playL to some playlist whose name is playListName
set playID to persistent ID of playL
--display dialog ("persistent ID = " & playID) buttons {"OK"} default button 1
reveal (some playlist whose persistent ID is playID)
repeat with aFile in theFiles
try
add aFile to some playlist whose persistent ID is playID
end try
-- set new date, so we know later when we copied the files
set the file_path to the quoted form of the POSIX path of aFile
do shell script ("/bin/touch " & file_path)
end repeat
end tell
end addTheFiles
Message was edited by: GabrielZ

folder actions have always been buggy and this has always been an issue when folder actions have to process many files at the same time. it's supposed to have gotten better in snow leopard but it's still very far from being reliable. you can try the following trick to slow down your folder action and make it wait to process individual items before they are all copied. that might (or might not ) help
http://discussions.apple.com/message.jspa?messageID=8277780#8277780

Similar Messages

  • Reapplied the thermal paste, now the fans kick in too early - downgrade FW?

    First of all, I have not forgotten to attach the temp sensor as previously mentioned. I was quite lucky that everything went well.
    My MBP is now 60 C top at almost full load (doing video at 80% load) and runs 48 in idle.
    Which is incredible but it's also loud. Even when idle the fans run faster than the minimal speed, which is obviously caused by better heat conductance. When under load the fans quickly begin to spin full speed. As I said I havn't topped the 60 C mark yet.
    Partly I think this has to do with the SMC firmware update, as Apple tweaked the fans to spin up earlier.
    What I'm looking for is a way to get the old threshold setting back (the one before the smc firmware update). So that my MBP is as cold as possible but also more quiet than now.
    And I read that there is a way of editing some powermanagment settings in order to change the threshold but havn't been able to google it.

    Maybe it's my english, but the fans don't go full speed all the time. Now as I barely started the MBP and just surfed the internet a bit, I have fans running at their minimum.
    And they stay on minimum as long as I don't do any harder work. Let's say start playing iTunes with visualization on.
    As for the skills. I'm not professionally trained, but I've been building my own PCs for a couple of years now. Never laptops, obviously, as they come already built. And yes I also have a copy of the Service Manual that was floating around. I think I tend to infrom myself very carefully before doing any such work. That's probably I'm a medical student, which brings us to thermodynamics.
    Apple defenitely applied too much termal paste, which has the effect that instead of filling in only the microscopic spaces of air between the heatsink and CPU, the thermal paste actually forms a layer between the CPU and heatsink. And generally speaking the thermal grease is a worse conductor than the CPU/Heatsink junction, but still much better than small spaces of air that would be between the CPU and Heatsink if no thermal paste was applied.
    Strangely my girlfriend has a MBP which doesn't get as hot as mine. But her was bought in august, mine in april, so Apple might have looked into the problem themself.
    About the Apple support thing:
    I'm from Slovenia, the official Apple seller ( www.epl.si ) has a very rude way of customer support. Luckily I live very near the Austrian border, so I bought my MBP in Austria.
    Well it seems to me that controlling the fans isn't yet possible on the MBP, as noone was able to point into any direction.

  • Screensaver kicking in too early with external display (VGA)

    This only started happening last night, and I've used it with the tv a few times and not had this.
    I connect it using the VGA connector...and I had it plugged into the power, yet the screensaver would come on every 15 minutes, which is what the battery power settings were. So I changed the battery power screen saver settings to 1 hour, and it still happened. The whole time Im still plugged in to the power!
    Anyone have any ideas why!?
    I'll see if it happens again tonight, and whether it happens without the tv plugged in (too tired to test it at 1am this morning!)

    I checked the forum and see this:
    VGA output noise
    https://forums.lenovo.com/t5/T400-T500-and-newer-T-series/VGA-output-noise/m-p/1596622#M98647
    I think what I saw is the exact same problem mentioned in this thread. But how should I fix it?
    Thanks.

  • Action happening too early

    My roll over action is happening too quickly how can I slow
    it down?
    http://www.mandarinedesign.com/staging/hubb/home.swf
    Also I want to add in URL links to the backside of the tag,
    but when I use getURL it brings the tag back to the up state when
    you roll off... HELP please

    slowing down that rollover animation depends on what you're
    using to display that rollover animation.
    and the rollout will be triggered when you rollout of the
    button. you can control that if you use a movieclip button, but not
    if you use a simple button.

  • Folder action delay until done

    I run a video encoding software called Episode Engine, and what it does is while encoding a video, it kicks out a temporary file in the output folder with a file size of 0. It does not actually update the filesize until encoding is complete.
    What I want to do is set a folder action to an output folder (which receives up to 5 videos at a time from encoding) that uploads the file automatically to a Transmit (FTP Client) favorite. I also want to account for the fact that I may drop large files in this folder as well, which could take time, but dont stay at 0 file size until the transfer is done. The part I'm having trouble with is delaying the transmit action until the file is done encoding. What I currently have does not work. And I dont know any way to monitor a folder action workflow, so I'm not sure where it's failing. Any recommendations?
    p.s. We're still running 10.6.8 on this computer (I know, I know...)
    property DELAY_TIME_SECONDS : 5 -- How long to wait between checking file size.
    on adding folder items to thisFolder after receiving theItems
         repeat with f in theItems
                             set currSize to 0
                             set oldSize to 0
                             set newSize to -1
                             repeat while currSize is 0
                                            delay 2
                                            set currSize to size of (info for f)
                             end repeat
                             repeat while newSize is not equal to oldSize
                                            -- Get the file size.
                set oldSize to size of (info for f)
                delay DELAY_TIME_SECONDS
                 -- Sample the size again after delay for comparison.
                                            set newSize to size of (info for f)
                             end repeat
         end repeat
    end adding folder items to

    Folder Actions has some built in support for recognizing 'busy' files, but it's not too intelligent.  It works well with Finder moves and copies, not so well with other things.  There are three ways I can think of to solve this problem.
    Tweak your script with a test for temp files so that it skips them.  This may cause secondary headaches (e.g. you skip a temp file, but Lightroom finishes the job in the ten second throttle period so the creation of the the file(s) you want to move is missed by folder actions), but there's no way to tell unless you try.
    Drop Folder Actions and set up a QueueDirectories launch agent.  This would wait for items to be added to the folder then move and delete them - you write the script to idle until temp files are done processing.
    Forget about immediate gratification and write a LaunchAgent that will sync the folders hourly using rsync.
    Which would you prefer?

  • Folder Actions will not work - tried everything

    Recently Folder Actions simply stopped working on 10.6.4. They worked fine before then recently just stopped working.
    I've tried everything I can think of, including:
    1. completely removing enabling & disabling & enabling folder actions through the setup app.
    2. trashing folder actions plist files in user domain and relaunching
    3. disabling related launchd processes with lingon
    4. trashing launch agents in user domain and also trying to unload them in terminal
    5. trying to kill the folder actions dispatcher process in activity monitor (just relaunches, as it should)
    6. emptying system caches including dyld shared cache using cocktail
    7. doing most of the above and restarting
    It's driving me nuts. Any other ideas?
    here's some entries from syslog:
    8/2/10 9:31:37 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 6 seconds
    8/2/10 9:37:29 AM Folder Actions Setup[4403] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 9:43:37 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.enabled[309]) Exited: Killed
    8/2/10 9:46:23 AM [0x0-0x3a03a].com.apple.systemevents[360] com.apple.FolderActions.enabled: Already loaded
    8/2/10 9:52:07 AM Folder Actions Setup[1083] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 9:52:16 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 7 seconds
    8/2/10 9:53:02 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 1 seconds
    8/2/10 9:56:18 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 10 seconds
    8/2/10 10:00:58 AM Folder Actions Setup[2190] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 10:01:01 AM com.apple.FolderActions.enabled[2236] launchctl: Error unloading: com.apple.FolderActions.folders
    8/2/10 10:01:30 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 10 seconds
    8/2/10 10:01:42 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 9 seconds
    8/2/10 10:05:03 AM sudo[2622] lryter : TTY=ttys000 ; PWD=/Users/lryter ; USER=root ; COMMAND=/bin/launchctl unload -w /Users/lryter/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    8/2/10 10:10:25 AM Folder Actions Setup[676] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 10:10:27 AM com.apple.FolderActions.enabled[680] launchctl: Couldn't stat("/Users/lryter/Library/LaunchAgents/com.apple.FolderActions.folders.plist"): No such file or directory
    8/2/10 10:10:27 AM com.apple.FolderActions.enabled[680] nothing found to unload
    8/2/10 10:10:38 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 8 seconds
    8/2/10 10:13:17 AM sudo[943] lryter : TTY=ttys000 ; PWD=/Users/lryter ; USER=root ; COMMAND=/bin/launchctl unload -w /Users/lryter/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    8/2/10 10:14:01 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 4 seconds
    8/2/10 10:14:14 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 1 seconds

    I finally go Folders Action to work, after being unable to use it even for a simple beep for years now.
    Here is what I did:
    1. Changed permissions to 755 for the following folder and two contained files (note that 775 didn't work for me)
    ~/Library/LaunchAgents/
    ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    ~/Library/LaunchAgents/com.apple.FolderActions.folders.plist
    2. Changed the following lines within ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist (using TextWrangler)
    from:
    <key>OnDemand</key>
    <false/>
    to:
    <key>OnDemand</key>
    <true/>
    Prior to the permissions changes within #1 above, the value of <true/> kept getting changed back to <false/> by something in the system... and though
    there was improvement by the permissions changes, the following console message appeared until false was changed to true.
    com.apple.FolderActions.enabled[4127] launchctl: Error unloading: com.apple.FolderActions.folders
    At this point true is staying true, and not being changed by unknown forces to false, and the above message is not appearing.
    3. The only other thing I did prior to #1 and #2 above, was to run the script (unsaved),
    tell application "/System/Library/CoreServices/Folder Actions Dispatcher.app" to tick
    This little tell line caused something to occur where my Folder Action surprised me and worked for the first time though it took about 30 seconds and was erratic,
    sometimes performing, sometimes not, though if I would do move something into the folder to trigger the action that should occur, and did not occur, then at the point
    running the above tell line or script would cause the action to occur.
    4. At this point I don't fool with the tell line or script from #3, and it seems that systemevents has gotten involved, as well as launchd, and with my simple Folder Action script
    I'm getting the folder action within 10 seconds compared to 30 to 45 if ever seconds.
    5. This is still too early to tell if this is the wonder pill I've needed since Leopard, and now Snow Leopard (and maybe Tiger as well: I forget when I even tried Folder Actions).
    There was a time when I moved things around, so that the items normally found in the former AppleScript folder, were placed elsewhere in subfolders, so I don't know if that lead to this...
    because I could get Folder Actions to work on Macs in the Applestore, but not my own Mac. Watching the console messages was helpful. I don't think it's a big concern that
    deprecated messages are found sometimes. That's a just a normal part of the constantly rebuilding of things that goes on. It's more like a reminder that we've got an upgraded
    OEM part were going to start using, and the older part won't be available after such and such date, so program accordingly, and in the meantime drive.

  • Unzip/Unstuff Folder Action

    I wanted to set up a folder in which a file would automatically unzip/unstuff once it is done downloading from an FTP site, and V.K. in the Automator board showed me this applescript:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;" title="this text can be pasted into the Script Editor">
    property DELAYTIMESECONDS : 5 -- How long to wait between checking file size.
    on adding folder items to thisFolder after receiving theItems
    repeat with f in theItems
    set oldSize to 0
    set newSize to -1
    -- When newSize equals oldSize, it means the copy is complete because the size hasn't changed.
    repeat while newSize ≠ oldSize
    -- Get the file size.
    set oldSize to size of (info for f)
    delay DELAYTIMESECONDS
    -- Sample the size again after delay for comparison.
    set newSize to size of (info for f)
    end repeat
    -- Do your processing here on file f.
    tell application "Finder" to open f
    -- thats where my processing should start for each file
    end repeat
    -- Or start processing here to wait for all files to be complete.
    end adding folder items to</pre>
    I attached it to a folder, and it works, but only on the first file. If I let multiple files download concurrently, the script never kicks in for the second, third, etc. file. Can the applescript be modified so that it hits every file that is, eventually, saved to the folder?

    The problem is that the folder action gets triggered the minute something gets added to the folder. This works when everything is added at once, but if there is much of a time delay between adding items there can be a problem, since repeatedly firing off the same folder action script on the same folder with different items doesn't seem to work very well.
    Another thing to try would be to just look at the folder itself to stop changing size. After the folder has stopped changing size (presumably because the files have finished downloading), all of the files would then be processed. The items would need to be moved somewhere during the processing, so that the next time the folder action is triggered, it would just be processing the new items (if the processing just gets all of the files, a sub folder could be used).
    The following folder action is similar to what you were using, it just looks at the folder size.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on adding folder items to thisFolder after receiving theItems
    if (WaitForFilesToCopy into thisFolder for 60) then
    tell application "Finder"
    set theItems to (files of thisFolder) as alias list -- get a new item list
    end tell
    repeat with anItem in theItems
    -- do stuff with anItem
    end repeat
    else
    -- the downloads didn't happen in time
    end if
    end adding folder items to
    to WaitForFilesToCopy into TheFolder for TimeToWait
    waits up to the TimeToWait for files to be copied/downloaded to TheFolder
    the test is based on the size of the folder not changing after several seconds
    the rough TimeToWait may need to be adjusted if copying several files/folders
    parameters - TheFolder [mixed]: the folder to check
    TimeToWait [integer]: a maximum timeout value in seconds
    returns [boolean]: true if copy/download finished, false if timeout
    set {Possible, Interval} to {false, 3} -- change the check interval as desired
    set CurrentSize to size of (info for TheFolder) -- get initial size
    repeat (TimeToWait div Interval) times -- check every Interval seconds
    delay Interval
    set NewSize to size of (info for TheFolder) -- recheck size
    if (NewSize is equal to CurrentSize) then
    if Possible then -- no change since last time
    return true -- success
    else -- one more time...
    set Possible to true
    end if
    else -- update size & Possible switch
    set {CurrentSize, Possible} to {NewSize, false}
    end if
    end repeat
    return false -- fail (timeout)
    end WaitForFilesToCopy
    </pre>

  • Downloads Folder Action

    Hello,
    I found a simple shell script that will help keep my Downloads folder organized by modification date. I used Automator to create a Finder Plug-In that's nothing but a Run Shell Script action: touch "$." Works great. I saved it as a folder action and attached it to my Downloads folder, but it won't work as a folder action. I added a Wait for Files to Copy action (testing with a pdf extension and download), and it still doesn't work. I tried to attach it to a dummy folder on my desktop that I directed Safari to save downloads to, still wouldn't work. I've saved it as a script, and attached it to the folder as a script, no joy. Will someone please help me with this. It should be very simple, I just want the items to be touched without having to touch each one myself.
    I have checked permissions on my user folder and Downloads folder, also deleted ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist and com.apple.FolderActions.folders.plist, logged out/in, disabled and re-enabled folder actions. Also, I have another folder action attached to my Downloads (Unquarantine), and it seems to work fine.
    Thanks in advance for any help,
    Jess

    I'm closing this question because the folder actions somehow work now. I must have shut down/started up enough times, or done something inadvertently to kick it into gear. I frequently have to check to make sure the folder actions are enabled, but other than that, my script works like a charm! Thanks for giving this your attention.
    Jess

  • Chapter Markers End Jump Too Early-Problem

    Folks, I am using DVDSP 4 and my chapter markers keep stopping too early from the burned DVD. When I play the Video_TS folder using Apple DVD player all is well. When I burn it and play it on a standard DVD player, all the chapter markers end jump earlier than they should - cutting off my full credit rolls on my video track.
    All of my chapter markers came from Final Cut Pro where I initially made them.
    Please advise.

    Make sure you test this on more than one player if it is a "for real" project of replication or duplication. All players are not created equal and there are the real weird things that may show up on only one or two players, but you need to make sure. You may want to try the other methods and see if it helps on the problem player just for fun. (Yeah, I know does not sound like much fun, but it is sort of interesting I guess )

  • Need a Folder Action Script to automate running of Applescripts in iTunes

    I posted this in the OSX forum but thought i'd try here too:
    I have a couple of applescripts that I have begun using on some of my podcasts. Specifically they will deselect "Skip When Shuffling" and "Remember Track Position" (Thanks Doug!). I feel like it is getting tedious to have to remember to run these scripts every time the Podcast updates a new episode. I'm looking for a folder action script that will run these applescripts whenever a new item is added to their folder. While I try to puzzle one together (having never written one) does anyone have anything to fit these needs?

    Yes.
    I recently need one to do something else.
    I'll just give you the script I am using, you can hack at will...
    property TargetPlaylist : "Library"
    on adding folder items to this_folder after receiving added_items
    repeat with each_item in added_items
    tell application "iTunes"
    add each_item to playlist TargetPlaylist
    end tell
    end repeat
    tell application "Finder"
    move every item of this_folder to the trash
    empty the trash
    end tell
    end adding folder items to
    This script when attached as a folder action will add the items dropped into it to my iTunes library, then delete them.
    You can easily tear this one apart to get what you need done.
    Beavis2084

  • Safari gives up loading images too early

    Hi
    I have noticed that Safari (currently I am using 3.1.1 but I had noticed this behavior on earlier versions as well) usually gives up on loading images too early.
    I have a 30Mbps internet connection and also in Firefox and Opera I do not experience the same problem.
    Is this a known issue? Are there currently any workarounds around this problem?
    Regards,
    Behrang

    From your Safari menu bar click Safari > Preferences then select the Privacy tab.
    Click:   Remove All Website Data
    Then delete the cache.
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If nothing above helped, troubleshoot Safari extensions.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test.
    If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.

  • Preflight droplet process returns too early – before it's done

    I'm calling an Acrobat preflight DROPLET from program that I'm writing, and I need to know when the files are ready, that is when the preflight fixups are done.
    I need to know this in order to go on with some other file system stuff in my program, that needs to be done after the preflight fixups.
    I guess the droplet just tells Acrobat what to do, and then exits. The Droplet process stays up for a while but exits before the work is done.
    There is an question from 2009 asking the exact same thing, but no answer.  Preflight droplet returns too early
    Since it's in a locked section of the forum I venture to ask the same question now, six years later.
    Checking the modified dates of all files does not seem to work since a preflight obviously does not alter files that are not in need of being altered.
    I'm on windows, and I don't know whether this is a platform dependent problem.
    What should I do?
    Thanks,
    Andreas

    This is not a good way to do it. But this is the way I do it now...
    It seems to work but there is no guarantee that it will work in the future, or even on all machines.
    private static int WaitForAcrobatReady() {
      // Get the current Acrobat instance.
      var app = new Acrobat.AcroApp();
      // While a preflight (droplet) is running, app.GetNumAVDocs() will
      // not return ANYTHING, it will just hang.
      return app.GetNumAVDocs();
    To sum up the efforts of the last weeks: Acrobat doesn't seem to be made for inclusion in other automation jobs. This is just another thing that doesn't work.
    (I had to use the C# library PDFSharp to do other things that Acrobat can do really well only that it's not possible to set those properties, or start that kind of actions, from "outside".)

  • Preflight droplet returns too early

    I want to convert a color PDF into grayscale. So I created a new preflight profile where nothing happens except color fixup:
    Advanced > Print Production > Preflight
    PDF Fixups > Convert to Grayscale
    I saved the profile and created a Droplet named grey.exe.
    When I call grey.exe smallSize_1MB.pdf everything  is fine. But when I have to convert a PDF having big filesize like grey.exe bigSize_160MB.pdf the Droplet .exe process returns before the preflight is done.
    Problems: A script (e.g. a batch file) continues without waiting for the Droplet to finish. So the script cannot make use the Droplet's result, e.g. a preflight report or the converted PDF file.
    Why does the Droplet's .exe process return too early? Everybody can test this with the help of the attached Droplet and the following batch scripts:
    smallSize.bat (use something small, e.g. 1 MB or smaller):
    copy /Y smallSize.pdf tmp.pdf
    grey.exe tmp.pdf
    echo "return"
    pause
    bigSize.bat (use something really big, e.g. 160 MB or bigger):
    copy /Y bigSize.pdf tmp.pdf
    grey.exe tmp.pdf
    echo "return"
    pause
    Ideas, anyone?
    Message was edited by: Droptix  I am using Adobe Acrobat 8.0 Professional.
    Message was edited by: Droptix  As an alternative I can imagine to re-produce the Droplet's function by Interapplication communication (IAC) through OLE, see http://www.adobe.com/devnet/acrobat/interapplication.html -> if anyone can tell me how to do a grayscale conversion via IAC/OLE... would be great! I know the IAC/OLE basics, can open, save and edit PDFs but don't know how to convert. It would also be possible to use: Advanced/Print Production/Convert Colors > set all Document Colors to convert > set Blending profile for instance to Gray Gamma 1.8 > set conversion options to don't embed profile.

    This is not a good way to do it. But this is the way I do it now...
    It seems to work but there is no guarantee that it will work in the future, or even on all machines.
    private static int WaitForAcrobatReady() {
      // Get the current Acrobat instance.
      var app = new Acrobat.AcroApp();
      // While a preflight (droplet) is running, app.GetNumAVDocs() will
      // not return ANYTHING, it will just hang.
      return app.GetNumAVDocs();
    To sum up the efforts of the last weeks: Acrobat doesn't seem to be made for inclusion in other automation jobs. This is just another thing that doesn't work.
    (I had to use the C# library PDFSharp to do other things that Acrobat can do really well only that it's not possible to set those properties, or start that kind of actions, from "outside".)

  • Problem running multiple folder actions at the same time

    Hi,
    Does anyone have some experience running multiple folder actions at the same time?
    I've written a Applescript folder action that processes some files. When adding some files, the script starts and all goes well. The processing of each file takes a few minutes, but all files are processed correctly.
    However, when adding some new files to the dropfolder, while the folder action is all ready processing other files dropped a few minutes earlier, the process that is all ready running immediately aborts and the folder action is relaunched on the new files, leaving the old files for what they are...
    The same problem occurs with multiple folders, each having a folder action attached. When dropping files in "Folder A", the script starts processing. But if someone droppes files in "Folder B", The script of folder A aborts, and the script of folder B starts processing. When adding more files to the folders, the result is the same. In some casses, when the last dropped files are processed, the os continues where the operation was aborted on the previous files. But this not always happens. To make things worse, when you remove the items from the folders afterwords, the folder actions starts running again on items no longer present in the folder !!!!
    Does anyone know how I can prevent the folder action being aborted when new files are dropped and placing the new files in "Hold", until the previous files are processed? How can I prevent a folder action being aborted when a item is dropped into another folder?
    I've written a small script to test this behaviour. Just create one or more folders and attach the script below. Drop a item into the folder, wait a few seconds and drop another one in the same or another folder. To monitor what happens please check the console.
    on adding folder items to this_folder after receiving added_items
              set FolderName to this_folder as string
              set ItemName to added_items as string
              repeat with theIncrementValue from 1 to 15
      delay 2
                        do shell script ("logger \"Folder: " & FolderName & "  -  Item: " & ItemName & "  -  Step: " & theIncrementValue & "\"")
              end repeat
              do shell script ("logger \"Folder: " & FolderName & "  -  Item: " & ItemName & "  -  Done...\"")
    end adding folder items to
    Thanks for any feedback.

    That is pretty much the way Folder Actions work, especially since AppleScript is not multi-threaded.  If you are using them as some intermediate step in a workflow, you might rethink the way you are handling the files (for example, use a droplet instead).  Other options would be using launchd to watch a path or a shell script on a different thread.

  • Folder Action Problems with Leopard 10.5.8

    My company recently upgraded from 10.4.11 to 10.5.8 and our folder actions have been stopping mid-process or not working at all. Sometimes a few files will process and then everything stops completely.
    Our workflow involves the use of several different hot folders that use folder actions (converting InDesign CS4 documents to various quality of PDFs). All of the actions are single stream, meaning each folder does the action it's assigned and the original file is trashed and the new file remains in the folder. There are no subsequent folder actions that pull from the newly processed files. We also only run one folder action (with several files dropped in it) at a time.
    I have also tried running a pre-made generic folder action script from Apple and it, too will stop mid-process, process a few files then stop, or not work at all.
    Does anyone know what might be causing this problem with either the new Applescript or Folder Actions with Leopard 10.5.8?

    I have several scripts that all work different ways. One script I have opens the InDesign document, exports a PDF to a different folder located elsewhere on the hard drive (where a different script searches for PDFs). After this the original document is sent to the trash. Nothing new is created in the original Folder Action Scripted folder.
    What's more, even Apple's stock Folder Actions don't work properly and stop mid-process. I've seen vague reports of 10.5.8 having issues with Applescript or Leopard in general. The fact this script works perfectly in 10.4.11 makes me think that something has changed with the way Leopard handles the FA's.

Maybe you are looking for

  • Using SNMP is it possible to find the vPC peer link of a Nexus 5K?

    I'm trying to use SNMP to get the Peer Link pair...

  • Issue with mix case

    Hi! Is there any way to prevent the data to be converted to upper-case without changing it's domain? I'm trying to insert mix case in a CHAR40 domain, but the text allways returns as upper-case. Regards, Andre

  • Designate area to be transparent

    I have a complex shape will lots of gaps, nad in those gaps is a layer that is colored orange. Is there a way to designate that all spaces with orange should appear transparent when saving as png? I cannot just delete the orange because it is converi

  • Lost Java DeskTop Icon

    hello I am new to Java programming. I have downloaded and installed free Java version JDK 6 SE on my computer. After the download and install was complete I received a message saying that the download was successful. Then clicking on the newly create

  • How to install new music on the new iMac if there is no cd drive

    I am thinking about buying a new iMac and want to know how to install new music if there is no cd drive available.