 |
White Papers & Tutorials
Sample Scripts for WinTasks
The built-in scripting language in WinTasks
5 Professional can be a very powerful tool. On this page, you
can find a collection of sample scripts.
|
|
Sample Script #1
This script will decrease the priority of Internet
Explorer if it uses more than 30% of the CPU.
|
| |
if
process_file =
"iexplore.exe" and
process_cpu_usage >
30 then
dec
endif |
|
|
Sample Script #2
This script will increase the priority of the defrag
process when started.
|
| |
if
process_name contains
"defrag" then
inc
endif |
|
|
Sample Script #3
This script will open config.sys with Notepad if autoexec.bat
is opened.
|
| |
if
process_names contains
"autoexec.bat" and
not process_names
contains "config.sys"
then
start "notepad.exe
config.sys"
endif
|
|
|
Sample Script #4
This script will prevent notepad.exe from running.
|
| |
if
process_file =
"notepad.exe" then
stop
alert "notepad
is not allowed to run on this computer"
endif |
|
|
Sample Script #5
This script will prevent autoexec.bat from being opened.
|
| |
if
process_window_names contains
"autoexec.bat"
then
stop
endif |
|
|
Sample Script #6
This script will stop Internet Explorer if it uses
more than 30% of the CPU.
|
| |
if
process_file =
"iexplore.exe" and
process_cpu_usage >
30 then
stop
endif |
|
|
Sample Script #7
This script will stop Internet programs, when the
screensaver is started, to make sure that the modem is
automatically disconnected.
|
| |
if
process_files contains
".scr" then
if
process_file =
"iexplore.exe" or
process_file
= "msimn.exe"
or
process_file
= "icq.exe"
then
stop
endif
endif |
If you want to try one of these scripts just
copy the and paste them to a new script in the scripting window.

Recommendations
for Your PC:
|