Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Script/Action to Dim Screen based on time of day

  1. #11
    Low Bitrate thanassius's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    83
    Ok so nevermind Automator, I resaved them as scripts, then created an event in iCal that repeats everyday at a specified time, and I set the alarm to Run Script. Still ahve to test on the mini though.

  2. #12
    Low Bitrate thanassius's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    83
    I'm about to resurrect an old thread, in hopes of putting it to bed for good! I took my install off of the indefinite hold it's been on for almost a year, and I just had some new thoughts on this issue...

    Bugbyte's AppleScripts mentioned above work great for an Apple notebook or cinema display, but unfortunatly have no effect on the touchscreens most of us are using. However, using Shades, you can adjust the screen brightness of any display connected to any Mac, as the adjustment is not dependant on any specific type of hardware. It also has the ability to assign hot keys to increase and decrease brightness functions.

    As I mentioned earlier, I have no coding skills at all, SO, would someone be willing to write up an AppleScript similar to Bugbyte's that opens Shades (if its not already running) and sends the hot key combinations to it? Shades can run hidden in the background (in its preferences, keep it out of the dock and the menu bar), and we can set the resulting Apple Script as a reccuring iCal alarm, to seamlessly automate the process of dimming and brightening our touchscreens at predetermined times of the day.

    I would be totally thrilled if someone would be able to do this! Thanks in advance :-)

  3. #13
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    I suggested this idea in the Amp wishlist thread but I don't think people took it seriously. I like this implementation. It should be a snap to write a script.

    For awhile, I looked into trying to calculate sunrise/sunset based on a user's lat/long but Applescript doesn't have the math functions to do it. You end up having to call them out of Coccoa! The iCal alarm idea is a dead simple solution for that problem.

    I'll look at it but no promises on time frames.
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  4. #14
    QCar Creator Jirka Jirout's Avatar
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    590
    http://www.srrb.noaa.gov/highlights/sunrise/azel.html

    Check the source of the page for JavaScript implementation of the algorithm that calculates the position of sun. And I am sure there are plenty of other sites and libraries. AFAIK it does not require any math, that is not doable in AppleScript.

  5. #15
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2

    Try this

    This worked on my Mini with Shades installed.

    There's no error handling in it. It assumes Shades is running. It then checks to see if it is either before or after 12:00pm. If it is after 12:00pm, it dims. If it is before 12:00pm, it brightens.

    It sends 10 repeats of Cmd and '-' or 10 repeats of Cmd and '+'. Make sure your hotkeys are set to this setting.

    You can easily modify how many times it repeats by opening the script in Script Editor and changing the number in the "repeat" lines. There are two.
    Attached Files Attached Files
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  6. #16
    Low Bitrate thanassius's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    83
    Thank you SO much Bugbyte. I hadn't even thought of the before noon/after noon way of doing it. I also like how the repeat function gives off an unintentional sort of animated/gradual dimming effect...pretty cool! Perhaps Aychamo can incorporate this with something similar to what Jirka linked to when Kindling is released (and I hope that's soon!).

    It will definitely be cool to have this run according to the user's sunrise/sunset times. In the meantime, I plan on adjusting my iCal alarms according to daylight savings, so that will at least put me in the right ballpark for when to dim/brighten my display.

    Thanks again for doing this, hopefully others will see how useful it can be!

  7. #17
    Constant Bitrate zapwizard's Avatar
    Join Date
    Aug 2002
    Location
    Austin, TX
    Posts
    149
    Thought I would bump this as I installed it and it works great.
    Will iCal still run the even if I set it for 8:00pm, but I dont turn my car PC on until 9pm?

  8. #18
    Low Bitrate thanassius's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    83
    I'm pretty sure it will. I'm using my mini inside the house right now, and if the computer isn't on or awake when the iCal alarm runs, it runs when i turn it on or wake it up if it was sleeping. I THINK it only does the most recent one, so in other words, if your computer was off for 2 days and you turn it on, it won't brighten then dim then brighten then dim, etc. It will only run the most recent one that you missed.
    iDub Status:

    99.99% -- It's alive!!!...the extra .01% is because it'll never be completely "done."

  9. #19
    Low Bitrate
    Join Date
    Feb 2005
    Location
    Nebraska, USA
    Posts
    61
    Sorry to resurrect an old thread, but I just installed my screen and needed to find a way to dim the screen at night. I haven't tested this program yet, but it will allow you to adjust screen gamma automatically based on sunrise/sunset and your lat/long (looks like this is 'pro' version only ($10)).

    It comes with a few AppleScripts, but I don't know how scriptable it is... if one could automatically update the lat/long once an hour or so with GPS data then this would remain accurate on long trips.

    http://www.aquiladigital.us/DarkAdapted/index.html

    Cheers,

    Sean

  10. #20
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431
    I was going to use my arduino coupled with an ambient light sensor for this but I figure it prolly won't be too hard to extend that function to optionally use the time. I'll look into it for NBB 1.X

    yeah this'll be easy
    check us out at: www.neonboombox.com

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Touch Screen Based Gesture Interface?
    By Lazyflip in forum Software & Software Development
    Replies: 13
    Last Post: 01-25-2006, 02:28 PM
  2. Dim LCD based on ambient light
    By neon_eddy in forum LCD/Display
    Replies: 3
    Last Post: 12-01-2005, 07:02 AM
  3. Request: Time based gamma control.
    By TRONiC in forum Centrafuse
    Replies: 2
    Last Post: 09-20-2005, 07:16 PM
  4. Replies: 6
    Last Post: 10-20-2004, 02:30 AM
  5. Replies: 13
    Last Post: 07-02-2002, 10:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •