topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 12:13 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: script to prevent near-sightedness!  (Read 12359 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
DONE: script to prevent near-sightedness!
« on: December 01, 2005, 03:52 PM »
Thanks to mouser I found this:

14. Prevent near-sightedness!

Poor distance vision is rarely caused by genetics, says Anne Barber, O.D., an optometrist in Tacoma, Washington. "It's usually caused by near-point stress." In other words, staring at your computer screen for too long. So flex your way to 20/20 vision. Every few hours during the day, close your eyes, tense your body, take a deep breath, and, after a few seconds, release your breath and muscles at the same time. Tightening and releasing muscles such as the biceps and glutes can trick involuntary muscles -- like the eyes -- into relaxing as well.

So all we need is a bit of code what would let the user set the interval and a way it will alert the user to do exactly what's necessary! :)

This seems not only to be healthy but would also be a cool program to mention on lots of different sites, including lifehacker and stuff.


Source: http://www.menshealt...793cd____&page=4

« Last Edit: December 02, 2005, 03:30 AM by brotherS »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: script to prevent near-sightedness!
« Reply #1 on: December 01, 2005, 04:04 PM »
perhaps a more general solution would be a program that you could set the interval (and enable/disable), and it would blank the screen and place up one random picture from a set, until you hit a key; the pictures would be illustrations and text of different such techniques, whether they be like this, or repetetive strain excercises, etc.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: IDEA: script to prevent near-sightedness!
« Reply #2 on: December 01, 2005, 04:09 PM »
I prefer to not being forcefully interrupted in what I'm doing at that moment, but maybe a nagging popup or something like that would be nice :)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: script to prevent near-sightedness!
« Reply #3 on: December 01, 2005, 08:41 PM »
 :) How about my TakeABreak v1.1?

It supports user defined messages.

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: IDEA: script to prevent near-sightedness!
« Reply #4 on: December 02, 2005, 03:32 AM »
:) How about my TakeABreak v1.1?

It supports user defined messages.

Skrommel
I read about TakeABreak, that's why I posted this new IDEA post: I would need a tool that won't block my desktop access completely, as useful as that may be for others :)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: script to prevent near-sightedness!
« Reply #5 on: December 02, 2005, 04:28 AM »
 :) Here's a little AHK script, I feel it's a bit simple for a full app.

Skrommel


;EyesSore.ahk
; Show a message at a user defined interval
;Skrommel @2005    www.dcmembers.com


;Settings
interval=1                              ;time in minutes
message=How about a little break?       ;message to show

;Main
interval*=60000
Loop
{
  Sleep,%interval%
  MsgBox,%message%
}

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: IDEA: script to prevent near-sightedness!
« Reply #6 on: December 02, 2005, 10:50 AM »
Thanks for the ideas, I changed it a bit to still know the details (about what to do) later and added
#Persistent
AutoExec5:
because I have to use "GoSub, AutoExec1" etc. in my AutoHotkey.ini to run more than one auto-execute script from it without problems.


;2005-12-02
;prevent near-sightedness
;Show a message at a user defined interval
;https://www.donationcoder.com/forum/index.php?topic=1676.new;topicseen#new
;Skrommel @2005    www.dcmembers.com
#Persistent
AutoExec5:
;Settings
interval=60   ;time in minutes
message=Poor distance vision is usually caused by near-point stress`n-------------------------------------------------------------------------------------------`nIn other words, staring at your computer screen for too long.`nSo flex your way to 20/20 vision. Every few hours, close your`neyes, tense your body, take a deep breath, and, after a few`nseconds, release your breath and muscles at the same time.`nTightening and releasing muscles such as the biceps and glutes`ncan trick involuntary muscles - like the eyes - into relaxing as`nwell.                                             -- Anne Barber, O.D.
;Main
interval*=60000
Loop
{
  Sleep,%interval%
  MsgBox,%message%
}

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: DONE: script to prevent near-sightedness!
« Reply #7 on: January 02, 2006, 12:26 PM »
I almost went crazy when trying to add another script - AutoExec6 - below that script from my last post. Somehow it prevents other autoexec scripts below it from being executed... :(

Any idea why and how to fix it?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: DONE: script to prevent near-sightedness!
« Reply #8 on: January 02, 2006, 06:43 PM »
 :tellme: You could replace the Loop with a SetTimer...

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: DONE: script to prevent near-sightedness!
« Reply #9 on: January 03, 2006, 12:50 AM »
Thanks, that works! I just wonder why the AHK page does not warn about using loops then...

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: DONE: script to prevent near-sightedness!
« Reply #10 on: January 03, 2006, 01:28 AM »
Hmm, I have another problem with this: When I use

Sleep,%interval%
SetTimer, EYES, %interval%

to prevent the timer being executed immediately after starting the script if will prevent the timer in the script below from being set correctly. How do I prevent this?