Introduction: Keeping Your World Visible With the Batch Eye Saver

If you're interesting in coding or batch scripting, check out my latest Ible here.

Your eyes are very important. Screw with your vision and it’ll screw with you. We live in a world of close-up work, and our eyes don’t like it.
Our eyes work like any other muscle, changing shape to perform a task; they exist in a round shape when focusing far away, and they become egg-shaped when focusing up close. And like any other muscle, they can develop fatigue, glitches, and problems. The eyes’ natural state is the round long-distance lense, but when your eyes focus on anything you can touch for too long, too often, they forget how to relax back into that round shape. They remain in the egg shape, causing near-sightedness.
Our eyes are designed for ten minutes of close-work at a time, at most. Going longer causes cramping and near-sightedness. However, this doesn’t mean you can’t read for more than ten minutes. To avoid cramping, fatigue, and other problems, look away every ten minutes and fix your eyes on something far away. Every half-hour, you should get up and stretch your entire body. Allowing your eyes to rest for a few seconds (You hear that? Seconds. No long break, just ten seconds or so is all your eyes need to relax.) every ten minutes will help your eyes stay healthy and your vision to stay clear.
Remembering to look away from the computer every ten minutes just doesn’t happen. You can set a timer, but after a while you forget to reset the timer. I came across a program at a health and fitness Giveaway that displayed a little window every ten minutes, reminding you to look up. As good as the idea was, however, the program wasn’t very well-designed. It was glitchy and took up a lot of memory. I liked the idea, however, and have written my own version using batch and VBS. My little program runs well and is easy to set up, and will help keep your eyes happy.
This may seem like a long –Ible, but the content is very simple and short. Case-in-point, I tend to be wordy and florid with my speech, and as I write the way I speak, my instructions can be a little lengthy and confusing. Anyone who has seen my –Ibles on hiding data (https://www.instructables.com/id/A_Few_Ways_To_Hide_Data_On_A_Computer/) and getting free media (https://www.instructables.com/id/El-Mano8217s-Official-Guide-To-Free-Media/)  may know what I’m talking about (I’m working on the Free-Media guide, for anyone who’s actually seen it, and I have more to add to it.) This Instructible is 6 steps long in order to make the instructions simple for anyone not familiar with scripting. Just follow the directions and look at the pictures, and you can easily set the program up.

I've entered this in the Humana Health By Design contest. If you like my work, my -Ible, or me in general, please vote for me.

Step 1: The Setup

First, you need a folder to put the program in. Any folder will do, but all three files must be in the same directory (folder). I went to Program Files (My Computer, C:\, also called Master Drive, Program Files), and created a folder (Right-Click, Create New, Folder, give the folder a name) I named the folder ‘Eye Doctor’. Remember what folder you picked.

Step 2: The Timer

Copy everything between the horizontal dotted-lines, and paste it into NotePad (START, Programs, Accessories, NotePad. You need to be using an Administrator account to create this program. Non-Administrator won't save the files). Only the text between the lines, and not the lines themselves.

-------------------------------------------------------------------
set shell = CreateObject("WScript.Shell")
wscript.sleep 900000
shell.run "Screen.bat"
-------------------------------------------------------------------

Click ‘File’, ‘Save As’. A little box will pop up. In the top bar, navigate to your folder, in this case ‘C:\Program Files\Eye Doctor’. In the bottom of the box, where it says “File Name”, type

Timer.vbs

You must put it exactly like that, including the capital. “Timer.vbs”. Underneath File Name, Change “Save As Type” From “Text File” to “All Files”. Then click “Save”. Simple enough?

Step 3: The Second Timer

Again, copy everything between the horizontal dotted-lines, and paste it into NotePad.

----------------------------------------------------------------------------
set shell = CreateObject("WScript.Shell")
wscript.sleep 15000
shell.sendkeys "fine"
shell.sendkeys "{ENTER}"
----------------------------------------------------------------------------

Go to “Save As” and return to your folder (The nav-bar will probably already be in your folder). Under File Name, type

Stretch.vbs

Again, it must be exact, capitals and all. Change the file type to “All Files”, and you should see a little icon for Timer.vbs appear below the navigation bar. Hit Save, and you’re halfway done.

Step 4: The Screen

A third time, copy everything between the horizontal dotted-lines, and paste it into NotePad.

---------------------------------------------------------------------------------------------------------------
@echo off
color 0a
title Your Personal Optometrist
start Stretch.vbs
:Loop
cls
set continue=no
echo.
echo.
echo.
echo.
echo          Look at something in the distance until this screen closes,
echo.
echo.
echo                           or we will find you!
echo.
echo.
echo.
set/p continue=  
if %continue%==fine goto Fine
goto Loop
:Fine
start Timer.vbs
exit
---------------------------------------------------------------------------------------------------------------


Hit Save As, go to your folder and save the file as

Screen.bat

Be sure to get the “.bat” correct. Change 'Save File As' (Now you see icons for both “Timer.vbs” and “Stretch.vbs” under the nav-bar), and hit Save. You’re done scripting.

Step 5: The Switches: Activating the Program

One final time, copy the text between the lines into NotePad.


----------------------------------------------------------------
@echo off
title Eye Doctor Switch
color 0a
if EXIST Eye_Doctor_Is_On.dat goto Off
echo Running>Eye_Doctor_Is_On.dat
cd C:\Program Files\Eye Doctor
start Timer.vbs
echo.
echo.
echo             Eye Doctor Is Running...
echo.
pause
exit
:Off
taskkill /f /im wscript.exe >nul
del "Eye_Doctor_Is_On.dat"
echo.
echo.
echo              Eye Doctor Is Off...
echo.
pause
exit
----------------------------------------------------------------

This file will be named

Eye Switch.bat

There are two places you can save this file:

If you want to activate the program and let it run until you shut it off, save Eye Switch.bat to the same folder as the others, C:\Program Files\Eye Doctor. Right-Click on Eye Switch and click on “Create Shortcut”. Drag and drop or cut and paste this new icon to wherever you want your on/off button to stay. To start Eye Doctor, double-click the icon. To shut it off again, activate the icon a second time.

If you want to have an indicator on your computer that the program is running, save the file to your Desktop; you still name it

Eye Switch.bat

Now, to start Eye Doctor, click on Eye Switch.bat. A blank file will appear on the Desktop named

Eye_Doctor_Is_On

Activate Eye Switch.bat a second time; “Eye_Doctor_Is_On” will disappear, and Eye Doctor will shut off. In short, if there is a file on your Desktop named “Eye_Doctor_Is_On”, Eye Doctor is running.

* If you click on Switch.bat to start Eye Doctor and the "Eye Doctor Is Off" window appears, perhaps displaying the message "Cannot find wscript.exe. Process does not exist.", click Eye Switch again. This means that you forgot to turn Eye Doctor off when you shut off the computer and the program couldn’t reset itself.

Step 6: Technical

Advanced users, you can probably find some program that will provide a better on/off switch then batch. For Windows XP, you can paste a shortcut to Eye Switch, or even Timer, into Startup.

Also, my knowledge of VBS is almost non-existent. Thank you, iRule, for your “Self-Writing Shutdown, https://www.instructables.com/id/VBS_Shutdown/, which I have adjusted many a time to create programs. If anyone knows a better way to script the VBS programs, please post.

Please leave any questions, comments, or ideas, as I do read them, and I try to keep things up-to-date.

******************************

E Mano:


Build your own Command Prompt

How to hide Computer Files from the Technically Illiterate

This simple health switch will Keep you Warm

Wreak Havok with this simple Computer Virus


******************************

Humana Health by Design Contest

Participated in the
Humana Health by Design Contest