Skip navigation
johneday
Currently Being Moderated

Waiting for action to complete

Aug 10, 2012 12:28 PM

Tags: #action_help

I have a series of actions that are called from AppleScript. However, the next action in the AppleScript is being called before the first previous one completes. Is there a function, property, status (or anything else) that will indicate that an action is still running?

 
Replies
  • Currently Being Moderated
    Aug 10, 2012 12:42 PM   in reply to johneday

    this is vb, there should be a similar one for AS

     

     

    Application properties

    Property                Value type           What it is

    ActionIsRunning      Boolean                Read-only. If true, an action is still running.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2012 12:46 PM   in reply to johneday

    You might try something like this placing a delay after each action and varying it as required. The number is seconds.

     

    --get a sourceFolder that holds the files to print
    set sourceFolder to (choose folder with prompt "Choose a folder with files to process:") as text
    
    -- get a list of files of the files to be printed in the sourceFolder
    tell application "Finder" to set workingFiles to (every file of folder sourceFolder) as alias list
    
    
    repeat with workingFile in workingFiles
        tell application "Adobe Illustrator"
            open workingFile
            
            tell current document
                
                do script "export" from "Default Actions" without dialogs
                delay 1
                
            end tell
            
            
            close current document without saving
            
            
        end tell
    end repeat
    
    
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2012 5:02 PM   in reply to johneday

    I don't think you can run VB in a mac.

     

    you didn't find the property in applescript? maybe it is called something else?....hmm, then as a workaround, maybe you can have your action do one additional step at the end of it, like for example change the color of a path, or select the top most object, then you could check if such last step is done then you'll know your action is done, if is not, sleep, check again later.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points