ANN: Quartz Composition Filters in Revolution for OSX

Thomas McGrath III 3mcgrath at comcast.net
Fri May 9 08:14:54 EDT 2008


Sivakatirswami,

It turns out there is a way to script some aspects of the Quartz  
Composition FIlters. It is a round about way and does not allow any  
further control than what I did so I don't think I will redo the demo  
stack just yet.

For instance if the QuartzComposer has a filter Glow and it has a  
range of 0 - 1 I can't figure out how to change the range, just the  
filter.

But here is the script:

tell application "Automator"
	activate
	set myWorkflow to make new workflow
	--
	set myAction1 to Automator action "Find Finder Items"
	tell myAction1 to set value of setting "where" to "User"
        -- Can't set the file to find via script...

	add myAction1 to myWorkflow
	--
	set myAction2 to Automator action "Apply Quartz Composition Filter to  
Image Files"
	add myAction2 to myWorkflow
	set myNewSetting to last Automator action of myWorkflow

	set value of setting "filterIdentifier" of myNewSetting to "Glow"

	-- comment the following to just test
	execute myWorkflow
	close myWorkflow without saving
end tell

This line will get the setting that can be changed for the action:
set myActions to the settings of Automator action "Apply Quartz  
Composition Filter to Image Files"

result: {setting "filterIdentifier" of Automator action id  
"com.apple.QuartzComposer.automatorActions.imageFilter" of application  
"Automator"}

Now, if someone knows a way to change the actual other setting for the  
Setting of the Action then we can get somewhere in Rev with this.

Yours truly,

Tom McGrath, (Not at RunRevLive)



More information about the use-livecode mailing list