NSColor opacity

Hi,

I’ve been trying many ways of changing a colors opacity with:

The current one I’m trying is:

What is the right way to write this in cocoa-applescript?

Here’s the whole handler:

Thanks,
kel

Model: MBP
AppleScript: AS 2.2.4
Browser: Safari 536.28.10
Operating System: Mac OS X (10.8)

Took a short nap and think this might be it:

I’ll have to try it when I get back.

Wish me luck,
kel

the parameters must not be a list


set ac to current application's NSColor's colorWithDeviceRed_green_blue_alpha_(0.3, 1.0, 0.3, 0.5)

Hi Stefan,

Yes, I rushed home to try it out and it works!

on applicationDidFinishLaunching_(aNotification)
        mainWindow's setOpaque_(false)
        set ac to current application's NSColor's colorWithDeviceRed_green_blue_alpha_(0.2,0.3,1.0,0.5)
        mainWindow's setBackgroundColor_(ac)
        --mainWindow's setAlphaValue_(0.5)
        return
    end applicationDidFinishLaunching_

Nice stuff.

Thanks,
kel