Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DVNIEL

Cancelled
Original poster
Oct 28, 2003
949
579
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"
try
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.