Commands
Below is an extremely brief treatment of the
commands available in jujutool.
Key:
[...] means
optional [...]* means zero or more [...]+ means one or
more ...|... means one out of the list
-
after <delay[second|minute|hour]> <command>
-
Wait for <delay> seconds, then execute a command.
-
Sample:
-
after 5 minutes dialog Time's Up!
-
after 2 hours shutdown
-
archive
-
from <directory-path>
-
to <directory-path>
-
chunk <mb_size>
-
A not well inplemented function for doing large
directory copies a chunk at a time. Quick and dirty solution to a
particular problem i had.
-
batch [<filepath>]
-
Runs a list of jujutool commands (or system commands) from a
file
-
beep [pc [<duration>
[<freq>]]][times <n>] [pause <n>]
- Makes a beep sound. Specifying pc means that it
will do a pc speaker beep.
-
clip load [contents|shortpath|text] [item1]+
- Loads list of items to the clipboard... usually
filenames. the contents switch loads the contents of
each file rather than the name. The shortpath option converts the names to
short paths before sending them to the clipboard.
- This command is best used with shortcuts in the
SendTo folder, providing the ability to send filenames (long or short) and
file contents easily to the clipboard. Specifying "text" pastes the rest
of the command line to the clipboard.
-
clip save [replace] [timestamp]
[<filepath>]
- Saves the contents of clipboard as text, either
appending or replacing contents. If timestamp is specified then the
current date and time will preceed each new entry. If filepath is
omitted then a file called "Clipped Text.txt" will be created on the
desktop.
-
compile <new-exe-name> [quiet]
<command-line>
-
Creates a self contained executable which has the same effect as
calling jujuSAK with command-line. For example "jujutool.exe compile foo.exe
mode 800 600 32" will create a new executable called foo.exe, which when
run will change the screen mode to 800 x 600. If quiet is not specified,
when new exe is run it will show a confirmation dialog with the
command(s) to be run.
-
container <filepath>
- Opens an explorer window of the parent folder of
the file, and if possible selects the file itself.
-
dialog [title <title>]
[ok|okcancel|yesno|yesnocancel][warn|info|question|error][[text]
<dialog-text>]
- Shows a dialog box to the user. If the box has
more than one response (for example, it may be a yes/no/cancel dialog)
the return value of the program will be different (OK or YES returns 1,
NO returns 0 and CANCEL returns -1)
-
encrypt [?|<password>] <file-source>
[<file-dest>]
- encrypts a file using simple TEA algorithm.
Using a ? for the password causes a user prompt for the password.
"decrypt" will reverse the process.
-
for each <file-filter> <command>
-
Runs a command on several files (one after another). For example,
"for each *.exe dialog Found %*" will launch a dialog announcing every
executable which can be found in the given folder.
-
icon [clear|opaque]
- Controls the background color of desktop icons.
"icon clear" forces this to be transparent. "icon" resets to default
(opaque). Works best under Win98 as Windows 2000 often 'resets' the
background color, and XP has integrated settings for this kind of thing.
- iterate [reverse] <iterator-path>
- Steps through files in a directory, launching
them in turn. If the iterator (a small text file) does not already
exists, it is created. Each time this command is executed, a different
file is opened. The last file opened is stored in the itererator. Be
careful where executables are in the same directory!
- Sample Syntax:
- iterate "C:\My Documents\Music\Playlists\iterator"
- menu <file-path>
- Opens a pop-up menu which can contain multiple jujutool and/or
system commands. each entry consists of a text label followed by oether
a command or a submenu definition (containing further entries), To see
sample syntax click here.
-
mail [beep|dialog] from <email> [to
<email>]+ [server <smtp-server>] [attach <filepath>]*
[subject <subject>] [body <body>...]
- Sends an email. This command is a fairly complex
one and provides very little feedback. You can choose to hear beeps or
have a dialog (or neither). In beep mode, if your send succeeds you
should hear a normal system beep, otherwise you will hear an error beep.
Depending on your connection sending could take a while. (Large
attachments aren't going to help either)
-
mode [<width> <height> <bpp>
[<hertz>]]
- Changes desktop screen mode. If requested mode
is not available no change will be made. If refresh rate is not
supplied, highest one available will be chosen. calling mode without
parameters will reset desktop to its default.
-
recent empty
- Clears the recent documents menu.
-
reg write <key> [int|string]
<value>
reg rename <key> <new-name> reg delete <key>
- Changes registry values. THIS CAN BE
DANGEROUS!
- Sample syntax:
- reg write "HKLM\Software\Fooware\Test" int 5
reg write "HKCR\Test\Fart\@" string This is
text! reg rename "HKLM\Software\Fooware\Test"
"NewName"
-
render text
-
to [wallpaper|<bmp-path>]
- wallpaper
is a shorthand way of rendering the text to a temporary bitmap and the
assigning that bitmap as the background bitmap.
-
font <face-name>
-
eg Verdana or
"Courier New" (quotes are required where
the name contains spaces)
-
size <font-size>
-
width <text-box-pixel-width>
-
height <text-box-pixel-height>
-
fullscreen
-
margin <margin-size>
-
text <text to render...>
-
from <file-path>
-
bold
-
italic
-
stretch
-
color <HTML-color>
-
bg <HTML-color>
-
fade <opacity-value>
-
A simple example:
-
render text to
wallpaper fullscreen text hello world!
-
will scale the text hello world to the width of the screen. The
default colors are the same as icon labels (thus by default the
background color if the rendered image will match the background color
of the desktop).
-
repeat
<times> [[on] every [<delay>|second|minute|hour]]
[<command>]
-
runs a command multiple times, optionally
pausing between iterations. Default iterations is 1, to stop accidental
infinite looping. -1 means infinite. if on is
specified, event will occur on the whole second, minute or
hour
. (eg
repeat every hour beep will bepp every hour ON the hour)
-
repeat 5 every 5 minutes dialog The time is now $[time]
-
restart
- Forces a warm reboot.
-
run [<command-line>]
-
Runs a command from the system. The only reason run is here is for
creating complex commands like "after 2 beep", where instead of the
jujuSAK beep you want to run an actual system command which is also
called "beep". An unlikely situation to occur, but just in case, the run
command is here, so you could type "after 2 run beep"
-
runwith [<command-line>]
-
Runs a command from the system. Before
launching, brings up a dialog allow the user to modify or extend the
command line parameters. Commands typed here can be either system commands or jujutool commands. If desired, the user can create a shortcut on the desktop using the command line entered.
-
set wallpaper <bmp-path>
- Sets the current wallpaper to a particular bmp.
This change will only last til the next desktop change and not be used
at startup.
-
shortcut <shortcut-path>
<command-line...>
- Creates a shortcut for a command line.
-
shortpaths <command-line...>
-
Converts all paths on command line to short paths before running the
command.
-
shutdown
- Forces a shutdown of the computer, powering off
if possible.
-
touch <file-path>
- Changes modification time on file to current
(like editing and saving a file, but doesn't actually change the file)
-
trash empty [<path>]
- Empties the recycle bin.
-
trip [nomove] [times <n>] [pause
<n>] [<command>]
- Sets up a "tripwire" under the mouse cursor, to
perform an action if the screen or window changes. For example, to cause
an event to happen (say, a beep) when a download gets to 80%, run "trip
beep" and place the cursor over the 80% position on the download dialog.
When the color changes (or the window disappears) the event will be
triggered.
-
wait <delay>
-
Wait for <delay> seconds before
exiting.
-
window [current] <window-command>
-
window at cursor <window-command>
-
window at <x,y> <window-command>
-
window
named <window-name> <window-command>
-
Performs a window-related task. Current commands are:
-
close
-
hide
-
show
-
min
-
max
-
restore
-
size <width> <height>
-
move <x> <y>
-
Compound Commands
Note that the command "repeat 5 pause 1 beep" is functionally very
similar to the command "repeat 5 after 1 beep". The only difference
between them is that the first will start beeping immediately, whereas the
second will wait first. Whenever a command is encountered (as in "after",
"repeat", "trip" etc) it is first checked for internal commands. If
jujutool doesn't recognize the command, it will send it to the system. A
wierd but legal compound command:
jujutool.exe after 4 trip dialog Yes, this is a
dialog
This would wait 4 seconds, then set up a trip wire which would trigger
a dialog when something under the mouse cursor changed.
|