newbie on scripting: making SallingClicker script for screen brightness, not working.

Discussion in 'Mac Programming' started by DVNIEL, Jul 13, 2005.

  1. DVNIEL macrumors 6502a


    Oct 28, 2003
    If there is anyone out there that has an expertise on scripting, your help would be great. I'm trying to make a slider feature for the screen brightness for my Powerbook using Salling Clicker. When I try to save the script I get a syntax error: Expected line ending, but found identifier.

    This is the actual script, if I am missing something or doing something wrong please let me know.

    property old_brightness : 0.5
    property new_brightness : 0.5

    tell application "SEC Helper"
    set old_brightness to screen brightness
    enter slider mode title "Screen Brightness" steps 10 value screen brightness * 10
    end tell

    on value_was_changed(passed_value)
    tell application "SEC Helper"
    set new_brightness to passed_value / 100
    set screen brightness to new_brightness
    show screen message "Screen Brightness" percentage value passed_value / 100
    end tell
    end value_was_changed

    on affirmative_slider_response()
    end affirmative_slider_response

    on negative_slider_response()
    tell application "SEC Helper"
    set screen brightness to old_brightness
    end tell
    end negative_slider_response

    Your help is greatly appreciated. Have a great day.
  2. Switzermac macrumors regular

    Jun 28, 2005

Share This Page