PDA

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




villanova329
Jul 13, 2005, 09:06 AM
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.



Switzermac
Jul 13, 2005, 09:27 AM
Talking about Salling, any news on Salling 3