'playblast 
'script for creating a playblast of the after effects window
'requires after effects
'requires MWSnap for capture(only full screen capture works)
'CHANGE OF PLAN: use mwsnap to save images directly to disk
'set options so mwsnap doesn't popup after capture
'after effects must not be minimized
'august 10 2009
'Clinton Reese
'www.clintons3d.com
'
' use:
' set after effects window to good capture size and set time to the first frame
' bake keys with expression to keyframes
'
Dim Input
Input = InputBox("How many frames ?") 

set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.AppActivate "Adobe After Effects"
WScript.Sleep 1000
For frame = 0 to Input-1
   'take an mwsnap shot - allow 4 sec to save the file
   WshShell.Sendkeys "^+d"
   WScript.Sleep 4000
   'move to next keyframe - baking required and keys must be visible by eye
   WshShell.Sendkeys "k"
   WScript.Sleep 1000
   
Next
MsgBox ("Playblast completed.")