Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 30, 2009, 09:42 AM   #1
thriftinkid
macrumors regular
 
Join Date: Mar 2008
Creatubg a loop

Hey guys,

I have some compression software I'm using that I need to create a loop command for. Long story, but basically I need the script to read if my compression status is still running. If it is, I need it to keep checking until it is done.

The following basic command gave returned this info when I ran it while compressing some video:

Code:
tell application "cleaner 6.5.1" to GetEncoderStatus
it returned:

{ProcessingState:ProcessRunning, NumPasses:2, CurrentPass:1, PercentDone:9.0}

I need to create a loop that either says if the ProcessingState=ProcessRunning, or if the PercentDone<100.0, then loop back and check again.
If the ProcessingState=ProcessStopped , or the PercentDone=100.0, quit cleaner 6.5.1

I just don't know how to write a script for a loop, or which would be the more stable variable to go by.

I posted some of the dictionary below. I don't know if this will help or not. Thanks in advance guys.

GetEncoderStatus v : get the current encoding status
GetEncoderStatus
→ EncodingStatus : current state


EncodingStatus n
properties
ProcessingState (ProcessStopped/ProcessRunning/ProcessPaused/ProcessSleeping, r/o)
NumPasses (integer, r/o)
CurrentPass (integer, r/o)
PercentDone (real, r/o)


BatchItemStatus v : Get the status of a given batch item.
BatchItemStatus integer : index of the batch item
→ bi_NoSetting/bi_Ready/bi_Paused/bi_Encoding/bi_Analyzed/bi_Skip/bi_SettingError/bi_Flattening/bi_Stopped/bi_Unflattened/bi_Done/bi_ErrorEncoding/bi_Flattened/bi_Deleted/bi_Uploading/bi_Uploaded/bi_ErrorUploading

Last edited by thriftinkid; Jul 30, 2009 at 10:03 AM. Reason: left out info
thriftinkid is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
A Possible Fix For DFU Loops in iPhone 4 and iPod Touch mooodey iPhone Tips, Help and Troubleshooting 0 Aug 9, 2011 05:56 PM
Garageband loop issue. WickedPuddin Mac Applications and Mac App Store 0 Jul 17, 2011 10:32 PM
iPhone 3G DFU Loop dweezle3 iPhone Tips, Help and Troubleshooting 5 May 15, 2011 02:51 PM
Resolved: Using sentinel loops? gmcguinn Mac Programming 6 Feb 9, 2011 03:16 PM
Garageband Looping 3paulx Digital Audio 0 Feb 3, 2011 08:46 PM


All times are GMT -5. The time now is 09:02 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC