Home | Contents | Index | Help | < Browse | Browse >
Bonus Tools
I have here included some programs that I think is useful in shell scripts
or directly from selector. They are either FreWare or PD, so you can (as
I understand) use them however you like. But read the .docs and .readmes
to be sure.
Here they are described:
------------------------------------------------------------------------
BreakName, by Kai Iske (BreakName.doc)
This command is used to break a process with the specified name.
------------------------------------------------------------------------
Change, By myself
This is used to edit a file, to change all (or some) occurences of
one text string to another. Try "Change ?" for more information.
------------------------------------------------------------------------
ChangeLine, By myself
This is used to edit a text file, to change one text line into
another. If the line searched for doesn't exist in the file, the
new line is simply added to the textfile. The program is made for
selector scripts, but can also be used for example adding something
to S:user-startup.
Changeline doesn't search in comments. Color and colour is counted
as the same word. Strings of spaces and tabs are regarded as
one space (" ").
Ex:
setenv newgap "gap 5"
changeline env:selector.settings newgap " gap "
This changes the first line containing the word "gap" in the
file "env:selector.settings" into "gap 5"
If you want to search for a whole word (not part of word), use
spaces like the example above. The searchword " color " finds
"color 2 3" but not "darkcolor 1", but if you use "color", any
of them could be found (the one that is first in the file).
You can also use many keywords, like this:
setenv varname "The new line"
changeline S:textfile varname " Hello man " "s" "play"
would find:
"Hello man There is a player there!"
or
"He plays backgammon! Hello man "
but not
"He plays chess! Hello man!" or "Hello you man who plays"
------------------------------------------------------------------------
Check Mate, By myself
(In Selector/Demos/)
It's a virus checker. Included to show a simple GUI made with
selector.
------------------------------------------------------------------------
ChopLine, By myself
This command chops of the first textline of a file, and puts
it in an env variable.
------------------------------------------------------------------------
ChopWord, By myself
This command chops of the first word from an env variable, and puts
it in another env variable.
Ex:
setenv a "Lets chop some words"
chopword a b
after this, a contains "chop some words" and b contains "Lets"
------------------------------------------------------------------------
Count, By myself
This command counts all occurences of a text string in a file. Try
"count ?" for more information.
------------------------------------------------------------------------
Delay, By myself
'Delay x' waits for x/50 seconds.
------------------------------------------------------------------------
Enclose, By myself
This command encloses an env variable with "-signs, '-signs,
@-signs etc. according to selectors sting syntax.
------------------------------------------------------------------------
ExecuteHack, By Norbert Püschel (executehack.readme)
With this hack installed you can protect a selector script +S and
then run it as a executable program. But you must also write this:
"#!selector" on the first line in the script.
How to do it:
1. Install the hack like this
2. Write a selector script file and put "#!selector" on the first line
and do not write any spaces before it. Example:
#!selector
screen Workbench
text Testing!
3. Now you have to set the "script flag" for the file. You do this
with this command:
Protect filename +S
4. Now, you can run the script with:
filename
instead of:
selector filename
------------------------------------------------------------------------
FileName, By myself
Command for handling and adjust filenames and directories.
------------------------------------------------------------------------
GetLine, By myself
Ex:
Getline file var " hello "
puts the first line in the file "file" that contains the word "hello"
into the variable "var". The search scheme and syntax are exactly the
same as for the "ChangeLine" command.
------------------------------------------------------------------------
GetVer, By myself
Improved version command. This program finds version numbers for
programs (and other files) even when no standard version
string exists in the file.
------------------------------------------------------------------------
MagicColors, By Volker Rudolph (MagicColors.guide)
MagicColors simply allocates the pens 4 to 7 of the Workbench
screen and copies the last four Workbench colors to them.
------------------------------------------------------------------------
psRun, by myself
Works in the same way as the screenRun option, but
can be used externaly if you for example not are using selector as
your main launching tool.
------------------------------------------------------------------------
RequestString, by Adam Dawes (Requeststring.txt)
This command has been described earlier Here
It simply requests a string using the reqtools.library
------------------------------------------------------------------------
SelectorFont, by myself
A font requester, more described here.
------------------------------------------------------------------------
SelectorScreens, by myself
Makes a selector script for choosing the different pubscreens.
Try "selectorscreens ?" for more info.
------------------------------------------------------------------------
SelectorText, by myself
This program converts a textfile to a selector file.
Try "selectortext ?" for more information. Here is a little
example what you can do with it:
.key text/F
echo >ram:file1 <text>
selectortext >ram:file2 ram:file1 50
echo >>ram:file2 "button Continue exit"
selector ram:file2
delete >nil: ram:file1 ram:file2
Try it as below!
execute bigmess Please note that this program is shareware. This demo version can only be used odd weeks even days. And this really disturbing info windows keeps poping up every 14 seconds.
------------------------------------------------------------------------
TextWrap, by myself
Program for formatting textfiles.
------------------------------------------------------------------------
TimeIt, by myself
Program for measuring how long different program executions takes.
Useful when programming or comparing different programs.
(Did once have the name "Bauto".)
------------------------------------------------------------------------
Unsort, by myself
Unsort <textfile>, The file is "line-randomized". If you want things
to happend in random order, you can for example do this:
list >ram:batfile mods: lformat "modplay %s"
unsort ram:batfile
execute ram:batfile
------------------------------------------------------------------------
WBRun, by Sylvain Rougier and Pierre Carrette. (WBRun.doc)
A command that runs a program as it had been started from workbench.
Very useful from selector. WBRun needs parm.library that also is
included in this package, under Tools/WBRun.
------------------------------------------------------------------------
Home | Contents | Index | Help | < Browse | Browse >