Keeping Your World Visible With the Batch Eye Saver
4232 Views, 7 Favorites, 0 Comments
Keeping Your World Visible With the Batch Eye Saver
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.
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.
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.
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?
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.
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.
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.
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
******************************