Help topics | Getting Started | Advanced Info | FAQ


The complete jv16 PowerTools script/console command interface reference

How to read the list
[Item/Item2/Item3] means that you must use either Item, Item2 or Item3 as a parameter.
(-Item) means that Item is an optional parameter, you can use it if you want to.
"Item" means that you must put the parameter inside ""s.
N usually means that the parameter must be a number.

Some commands access secured features of the program, this means that the user running the program must have needed security privileges. Remember that when you run these commands from a script file they are executed with the security access of "$Script User" and not the "$Default" user account.
Click here to find out more about the custom user accounts and security features.

The commands are not case sensitive. Nearly all of the commands require some kind of security privileges. For example, the "Clear IE_Cache all" command requires that the current user has a full access to Command_Clear and FileTool. You can find more info about the security features from here.

You can find some example scripts under \Documentation\Example scripts\ from the directory where you installed the program to, usually C:\Program files\jv16 PowerTools\Documentation\Example scripts\



Basic commands

MainWindow
Action: Shows the main window.

RegManager
Action: Shows the registry manager.
Security privileges needed: At least a read-only level access to the registry manager.

RegCleaner
Action: Shows the registry cleaner.
Security privileges needed: At least a read-only level access to the registry manager.

RegFinder
Action: Shows the registry finder.
Security privileges needed: At least a read-only level access to the registry finder.

RegMonitor
Action: Shows the registry monitor.
Security privileges needed: At least a read-only level access to the registry monitor.

FileTool
Action: Shows the file tool.
Security privileges needed: At least a read-only level access to the file tool.

ScriptManager
Action: Shows the script manager.
Security privileges needed: At least a read-only level access to the script manager.

ScriptEditor
Action: Shows the script editor.
Security privileges needed: At least a read-only level access to the script editor.

Access Control
Action: Shows the access control window
Security privileges needed: At least a read-only level access to the access control window.

Backups
Action: Shows the backup tool window
Security privileges needed: At least a read-only level access to the backup tool window.

Preferences
Alias: Options
Action: Shows the preferences window
Security privileges needed: At least a read-only level access to the preferences window.

Console
Action: Shows the Console window.
Security privileges needed: At least a read-only level access to the console window.

RemSoftware
Action: Shows the remove custom software window.
Security privileges needed: At least a read-only level access to the registry tool.

APS
Action: Shows the Advanced Password System tool.

CS
Syntax: CS [Software/Startup/Uninstall/Filetypes/New file/Shell extensions/Open with/Search/Context menu]
Action: Changes the registry tool's section.
Security privileges needed: At least a read-only level access to the registry tool.

Close
Syntax: Close [WindowName]
Action: Closes the specified window.

Close Active Window
Action: Closes the currently active tool of the jv16 PowerTools.

Exit
Action: Terminates the program.

Terminate
Action: Does the same as Exit, i.e. terminates the program.




Usage of the basic features
Commands that allows you to use the main tools of the program

FindFiles
Syntax: FindFiles [C:\dir\] [$C:\dir2\] Find="Search word" Retrieve="Retrieved info" Special=""
More syntax information:
The following parameters can be used for Retrieve parameter: Size SizeB, Attributes, Created, Accessed, Modified, Desc, Version, Author, Binary Type, Title, Artist, Album, Year, Comment, Genre, Dimensions, Colour Depth.
The following parameters can be used for Special parameter: OnlyTempFiles, OnlyBrokenShortcuts, OnlyDuplicates.
Symbol $ in the beginning of the directory tells the program also to search from the dir's subdirs.
There can be multiple source blocks. See the examples.
Action: Finds files from specified dir(s) and shows the results in the file tool. Automatically shows the file tool if necessary.
Examples:
FindFiles [C:\Temp] Find="*.exe" - Finds all .exe files from C:\Temp\ but not from its subdirs.
FindFiles [$C:\Temp] Find="*.dll;;*.exe" - Finds all DLL and .exe files from C:\Temp\ and all of its subdirs.
FindFiles [$C:\] [Source="$D:\"] Find="*.* -*.exe -*DLL" - Finds all files except .exe and DLL files from the C and D drives.
FindFiles [$C:\] Find="*.*" Special="OnlyDuplicates" - Finds all duplicate files from C drive.
Notice: You must give multiple filename masks separated with double semicolons, like: "*.exe;;*DLL".
Click here for more information about the filename parser and its features.
Security privileges needed: At least a read-only level access to the file tool.

FindDirs
Syntax FindDirs [C:\Dir\] [$C:\Dir2\] Find="Search word" (OnlyEmpty="True")
Action: Finds directories from the specified dir(s) and shows the results in the dir tool. Automatically shows the dir tool if necessary.
Example: FindDirs [$C:\Temp] Find="*.*" OnlyEmpty="True" - Finds all empty directories under C:\Temp and from its subdirs.
Security privileges needed: At least a read-only level access to the dir tool.

RegCleaner
Syntax: RegCleaner [Manual/Automatic] (-hklm) (-hkus) (-hkcu) (-hkcr) (-exts) (-font) (-ole) (-mos) (-sof) (-help) (-app) (-add) (-opw) (-sha) (-fix) (-ignored) (-nobackups) (-idle) (-nopopup) (-nothread)
Action: Starts the Registry Cleaner. Execute the RegCleaner command without any parameters to show just the registry cleaner window.
Security privileges needed: At least a read-only level access to the registry tool.

RegFinder
Syntax: RegFinder "search word1" "search word 2" ... (-hkcr) (-hkcc) (-hkcu) (-hklm) (-hkus) (-Case) (-FullWords) (-KeyNames) (-ValueNames) (-ValueData) (-idle)
Action: Starts the Registry Finder. Execute the RegFinder command without any parameters to show just the registry finder window.
Security privileges needed: At least a read-only level access to the registry tool.

RegSnapshot
Syntax: RegSnapshot "Comments" (-hkcr) (-hkcc) (-hkcu) (-hklm) (-hkus) (-idle) (-NoPopUp)
Action: Creates a snapshot of the registry. Execute the command without any parameters to show the registry monitor tool.

Clear
Syntax: Clear [IE_Cache all/IE_Cache pics/IE_Cache pages/IE_Cache cookies/Error log/Command cache/Console cache/RegCleaner Cache]
Action: Clears the specified item, like the command cache or all cached pictures from Windows' temporary Internet files folder.
Advanced information:
"Clear IE_Cache pics" removes all following picture formats: .jpg, .jpeg, .jpe, .bmp, .png, .gif, .jp2.
"Clear IE_Cache pages" removes all .htm, .html and .shtml files.
Notice: If you wish not to remove certain cookies you can define these cookies in \Settings\Ignore\Cookies.dat.
Security privileges needed: Full access to the clear command.

Encrypt
Syntax: Encrypt [Twofish/Blowfish/Rijndeal/Skipjack/Square] "password" [XFG]
Action: Encrypts the files with the specified algorithm and password.
Security privileges needed: Full access to the file tool.

Decrypt
Syntax: Decrypt "Password" [XFG]
Action: Decrypts the files using the specified password, the program can automatically detect the used algorithm.
Security privileges needed: Full access to the file tool.

List
Syntax: List [SystemDLLS/SharedDLLs/BrokenShortcuts/TempFiles/UnNeededFiles]
Action: Lists the requested files in the file tool.
Security privileges needed: At least a read-only level access to the file tool.

View
Syntax: View [Error log/command cache/"filename"]
Action: Opens the specified file with the default file viewer.
Security privileges needed: Full access to the view command.

SaveList
Syntax: SaveList [WindowName] "Filename.txt"
Action: Saves the tool's current list to a file. The command supports following data formats: txt, html, xhtml, xml, csv and Microsoft Excel97 xls.
Example: SaveList RegManager "C:\File.html" - Saves the current view of the registry tool to C:\File.html.




System commands

SetWallpaper
Syntax: SetWallpaper Filename.bmp
Action: Changes the Windows wallpaper. Notice that the file must be in BMP format.

SetStartPage
Syntax: SetStartPage http://www.address.com
Action: Changes the Internet Explorer's start page.

WriteRegistryValue
Syntax: WriteRegistryValue "RootKey" "Key" "ValueName" Data
Action: Writes the data to the registry.

ReadRegistryValue
Syntax: ReadRegistryValue"RootKey" "Key" "ValueName"
Action: Reads the data from the registry.

Tasks
Actions: Lists all running programs.

WinLicense
Action: Shows the owner of the Windows' license.

Shutdown
Action: Shuts down the computer.

Reboot
Action: Reboots the computer.

GetWinLang
Action: Returns the Windows' language.

SysErrorCodeToMessage
Syntax: SysErrorCodeToMessage ErrorCode
Action: Converts a system error code to an error message.

Logoff
Alias: Logout
Action: Logs off from jv16 PT and shows the Login screen.
Security privileges needed: Full access to logoff command.

GetAssocProgram
Syntax: GetAssocProgram extension
Action: Analyses the system and returns the program which owns the file type association.
Example: GetAssocProgram txt - Returns: C:\WINDOWS\system32\NOTEPAD.EXE (In my computer)

CPUSpeed
Action: Returns the estimated CPU speed.

GenerateSystemID
Action: Generates an unique system ID which is based on the name of the computer and the IP address. If the IP and the computer's name doesn't change the ID doesn't change. If you have a lot of computers you might want to use this ID number to identify them.

GenerateSystemReport
Action: Generates a full report about the system.




Interface commands

These commands allows you to access the programs graphical user interface from the console or from a script file.

Click
Syntax: Click [WindowName] [Button/Menu] "Caption"
Action: Sends a virtual mouse click to the specific button or a menu item. The tool where the button is must be visible when executing this command.
Examples:
Click FileTool Button "More Functions..." - Clicks the More Functions button in the file tool.
Click RegManager Menu "FAQ" - Clicks the Help>FAQ menu item.
Note that these examples work only if the program is using the English language.

Check
Syntax: Check caption
Action: Checks (i.e. ticks) the specified check box. The tool where you want to check the check box must be visible when you execute the command.
Example: Check Find only temp files - Checks the file tool's (which must be visible) option to find only temp files.

UnCheck
Syntax: UnCheck caption
Action: Unchecks (i.e. removes the tick) the specified check box. The tool where you want to uncheck the check box must be visible when you execute the command.

SetText
Syntax: SetText "Caption" text
Action: Writes the text to the specific text box. The tool which you want to access must be visible at the time.
Example: SetText "Search word" *.* - Puts the word "*.*" to the file tool's search word box if the file tool is visible.

GetText
Syntax: GetText "Caption"
Action: Reads the text from the specific text box. The tool which you want to access must be visible at the time.

Scroll
Syntax: Scroll [WindowName] N
Action: Scrolls the list by N units.

Select
Syntax: Select [WindowName] [all/inverse/none/highlighted]
Action: Selects specified items from a tool.

Find
Syntax: Find [WindowName] "Search word"
Action: Highlights one or more items matching the search word.

FindMark
Syntax: Find [WindowName] "Search word"
Action: Selects one or more items matching the search word.

GetItem
Syntax: GetItem [WindowName] N
Action: Returns the data from the Nth item of the list.

GetItemC
Syntax: GetItemC [WindowName] N
Action: Returns the caption of data from the Nth item of the list.

GetItems
Syntax: GetItems [WindowName]
Action: Returns all the data from the specific tool's current list.

GetItemCount
Syntax: GetItemCount [WindowName]
Action: Returns the amount of items in the specific tool's current list.

GetSelItems
Syntax: GetSelItems [WindowName]
Action: Returns all the data from selected items of the specific tool's current list.

GetHighItems
Syntax: GetHighItems [WindowName]
Action: Returns all the data from highlighted items of the specific tool's current list.

GetVisItemCount
Syntax: GetVisItemCount[WindowName]
Action: Returns the amount of visible items in the specific tool's current list.

GetCreatedForms
Action: Lists all created forms (i.e. jv16 PowerTools' own windows).

GetVisibleForms
Action: Lists all visible forms (i.e. jv16 PowerTools' own windows).

GetMousePos
Action: Returns the position of the mouse pointer.

SetMousePos
Syntax: SetMousePos X Y
Action: Moves the mouse pointer to the specific place.

Hide
Action: Hides the program. Should only be used in script files and not from the console.

UnHide
Action: Shows the program again.

Trans
Syntax: Trans N
Action: Makes the Console window N % transparent. N is a number between 0 and 99. Works only under Win2000 and XP or newer.





File commands
Commands that allows you to view or modify files and directories.

XFG
Action: XFG means eXtended File Grouping, it's a very powerful way to group many files together. This feature allows you to give many files as parameters for many commands.
Syntax: "File1" "File2" "File3" "File4" ... and/or "Directory1" "Directory2\*.exe" "Directory3\*DLL;*.exe" ...
Examples:
"C:\test\foo.dat" "C:\Temp\*.temp;*.tmp" - Gives the file C:\test\foo.dat and all .tmp and Temp files in C:\Temp as parameters.
"$C:\Temp\*.*" "D:\Foo\*.* -*.txt" - Gives all files under C:\Temp (and from its subdirectories) and all files except .txt files from D:\Foo\ as parameters.
"\*.txt" - Gives all .txt files from the current directory as parameters.

The directories and filenames can be relative, for example, if you are currently in C:\Windows\ directory and you want to give all files from C:\Windows\Temp as parameters you can do it by writing: "\Temp", if you want also to include the subdirectories you can do that by: "\$Temp\".

Copy
Syntax: Copy "Destination dir" [XFG]
Action: Copies files to the specified destination.
Security privileges needed: Full access to the file tool.

Move
Syntax: Move "Destination dir" [XFG]
Action: Copies files to the specified destination.
Security privileges needed: Full access to the file tool.

DeleteFile
Syntax: DeleteFile [XFG]
Action: Removes files. Doesn't create backups.
Security privileges needed: Full access to the file tool.

WipeFile
Syntax: WipeFile [XFG]
Action: Removes the files by wiping it. Doesn't create backups.
Security privileges needed: Full access to the file tool.

MoveToBin
Syntax: MoveToBin [XFG]
Action: Removes the files by moving them to the Windows recycle bin. Doesn't create backups.
Security privileges needed: Full access to the file tool.

CombineFiles
Syntax: CombineFiles "NewFilename" "File1" "File2" "File3" "File4" ...
Action: Combines the files.
Example: CombineFiles "C:\AllParts.mpg" "C:\Movie_Part1.mpg" "C:\Movie_Part2.mpg" - Combines two parts of the movie into a single, full lenght movie.
Security privileges needed: Full access to the file tool.

XCombineFiles
Syntax: XCombineFiles "NewFilename" [XFG]
Action: Combines the files.
Security privileges needed: Full access to the file tool.

Mkdir
Syntax: Mkdir Directory
Action: Creates a new directory. The directory path can be relative or absolute.
Security privileges needed: Full access to the file tool.

CreateDir
Syntax: CreateDir C:\NewDir\
Action: Creates a directory and the subdirectories.
Example: CreateDir C:\123\321\foo\test\123 - Creates the C:\123 directory and the subdirectories to it.
Security privileges needed: Full access to the file tool.

Rmdir
Syntax: Rmdir Directory
Action: Removes an empty directory. The directory path can be relative or absolute.
Security privileges needed: Full access to the file tool.

FlushDirectory
Syntax: FlushDirectory [XFG]
Action: Removes all files and subdirectories from the directory but doesn't remove the directory itself.
Security privileges needed: Full access to the file tool.

Ren
Syntax: Ren "filename" "new filename"
Action: Renames a file.
Security privileges needed: Full access to the file tool.

Attr
Syntax: Attr (+a) (-a) (+h) (-h) (+r) (-r) (+s) (-s) [XFG]
Action: Removes or adds the specified attributes to many files at a same time.
Example: Attr +a -r "$C:\Temp\" "D:\Temp\*.tmp" - Adds the archive attribute and removes the read-only attribute from all files under C:\Temp (including the subdirectories) and all .tmp files in D:\Temp.
Security privileges needed: Full access to the file tool.

Grep
Syntax: Grep "search word" [XFG] (-case) (-fullwords) (-n:20)
Action: Searches the search word within the specified files, or all the files in specified directories. Use the Case parameter to make the search case sensitive and use the Fullwords parameter to search only full words. The N parameter defines how long data the command will show, for example -n:20 shows 20 characters, -n:40 shows 40 characters. If no N parameter is defined the program uses a default value of 40 characters.
Example:
Grep "Test" "C:\TextDoc.txt" "E:\docs\" - Finds word "Test" from C:\TextDoc.txt and from all files in E:\Docks\.
Grep "Test" "E:\Docs\*.txt" "$C:\Texts\*.txt;*.html" - Finds word "Test" from all .txt files from E:\Docs\ and all .txt and .html files under C:\Texts\ and from its subdirs.

GrepEx
Syntax: GrepEx "search word" "replace with" [XFG] (-case) (-fullwords)
Action: Searches and replaces the search word with another word within the specified files, or all the files in specified directories. Use the Case parameter to make the search case sensitive and use the Fullwords parameter to search only full words.
Example:
GrepEx "Test" "123" "C:\TextDoc.txt" "E:\docs\" - Finds word "Test" and replaces it with "123" from C:\TextDoc.txt and from all files in E:\Docks\.
Security privileges needed: Full access to the file tool.

LineGrep
Syntax: LineGrep "search word" [XFG] (-case) (-fullwords) (-n:20)
Action: Searches for the lines containing the search word.
Use the Case parameter to make the search case sensitive and use the Fullwords parameter to search only full words.

LineGrepEx
Syntax: LineGrepEx "search word" "replace with" [XFG] (-case) (-fullwords)
Action: Searches for lines containing the search word and replaces the lines with the specified word.
Use the Case parameter to make the search case sensitive and use the Fullwords parameter to search only full words.

RunScript
Syntax: RunScript "Filename.jvb"
Action: Executes a jv16 PowerTools script file.

Run
Syntax: Run Filename.exe (-Hide) (-Shell)
Action: Runs a program. If the Hide parameter is used then the program is started as invisible. Use the Shell parameter to make the program to use Windows' ShellExecute function which can open files with their default viewer.
Examples:
Run C:\Windows\notepad.exe - Starts the Notepad.
Run C:\My documents\text.txt -Shell - Starts default text editor and opens the document in it.
Security privileges needed: Full access to the Run command.

XRun
Syntax: XRun "filename.exe" [Idle/Normal/High] [Hidden/Maximized/Minimized/Normal]
Action: Runs a program. You can also define the program's priority and the window state.
Security privileges needed: Full access to the XRun command.

RunWait
Syntax: RunWait filename.exe -t:10
Action: Runs a program and waits for its termination. By default PowerTools waits one minute for the program to finish, you can define a custom time to wait with the T parameter.
Example: RunWait "c:\windows\sol.exe" -t:60 - Runs Windows Solitaire and waits one minute for its termination.
Security privileges needed: Full access to the Run command.

FileExists
Syntax: FileExists filename
Action: Returns "True" if the file exists, otherwise returns "False".

DirExists
Syntax: DirExists directory
Action: Returns "True" if the directory exists, otherwise returns "False".

ReadFile
Syntax: ReadFile filename
Action: Opens the file and shows its content.

WriteFile
Syntax: WriteFile "filename" data
Action: Writes data to the specific file.

AppendFile
Syntax: AppendFile "filename" data
Action: Writes the data to the end of the file. Should only be used with ASCII files.

WriteIniLine
Syntax: WriteIniLine "filename" "Section" "DataName" "Value"
Action: Adds a new entry to an INI file.

ReadIniLine
Syntax: ReadIniLine "filename" "Section" "DataName"
Action: Reads one entry from an INI file.

FileCreated
Syntax: FileCreated [XFG]
Action: Retrieves the date and time when the files were created.
Note: Uses the following date format: DD.MM.YYYY, HH:MM

FileAccessed
Syntax: FileCreated [XFG]
Action: Retrieves the date and time when the files were last accessed.
Note: Uses the following date format: DD.MM.YYYY, HH:MM

FileModified
Syntax: FileCreated [XFG]
Action: Retrieves the date and time when the files were last modified
Note: Uses the following date format: DD.MM.YYYY, HH:MM

FileCount
Syntax: FileCount [XFG]
Action: Shows the amount of files.

GetFileOwner
Syntax: GetFileOwner [XFG]
Action: Shows the files' owner. Only for NT systems.

TotalSize
Syntax: TotalSize [XFG]
Action: Shows the total size of the files.

MaxSize
Syntax: MaxSize [XFG]
Action: Shows the size of the largest file.

MinSize
Syntax: MinSize [XFG]
Action: Shows the size of the smallest file.

AverageSize
Syntax: AverageSize [XFG]
Action: Shows the average size of the files.

Size
Syntax: Size [XFG]
Action: Shows the files' sizes.

SizeB
Syntax: SizeB [XFG]
Action: Shows the files' sizes in bytes.

SizeKB
Syntax: SizeKB [XFG]
Action: Shows the files' sizes in kilobytes.

SizeMB
Syntax: SizeMB [XFG]
Action: Shows the files' sizes in megabytes.

GetExeType
Syntax: GetExeType [XFG]
Action: Shows the type of an executable file, such as .exe or DLL file.

File
Syntax: File [XFG]
Action: Shows the type of a file.

FileProp
Syntax: FileProp Filename
Action: Shows information about the file with the default Windows file properties window.

FileProp2
Syntax: FileProp2 Filename
Action: Shows information about the file with the jv16 PowerTools' file properties window.

FileVer
Syntax: FileVer [XFG]
Action: Shows the version of files. Works only with executable files, such as .exe files.

SHA1
Syntax: SHA1 [XFG]
Action: Generates a SHA1 checksum of files.

MD5
Syntax: MD5 [XFG]
Action: Generates a MD5 checksum of files.

CRC
Syntax: CRC [XFG]
Action: Generates a CRC-32 checksum of files.

XFindFiles
Syntax: XFindFiles [XFG]
Action: Lists the files matching the XFG search word.

XFindEmptyFiles
Syntax: XFindEmptyFiles [XFG]
Action: Lists all empty files, i.e. files with the size of 0 bytes.

XFindSmallerFiles
Syntax: XFindSmallerFiles Size [XFG]
Action: Lists all files smaller than the given size. The size parameter is the size in bytes.

XFindLargerFiles
Syntax: XFindLargerFiles Size [XFG]
Action: Lists all files larger than the given size. The size parameter is the size in bytes.

XFindFilesBySize
Syntax: XFindFilesBySize Size [XFG]
Action: Lists all files with the given size. The size parameter is the size in bytes.

DeleteFiles
Syntax: DeleteFiles List of files
Action: Removes the files. The parameter is a list of files, so you can easily use this with commands that output a list of files. For example, XFindEmptyFiles "C:\Temp\*" | DeleteFiles; will remove all empty files from C:\Temp.

MakeFile
Syntax: MakeFile Filename
Action: Creates an empty file.
Security privileges needed: Full access to the file tool.

UpdateRestoreAllBat
Action: Updates the RestoreAll.bat file. Usually the file is updated (i.e. regenerated) when you access the backup tool.

ValidTranslation
Syntax: ValidTranslation [XFG]
Action: Checks the validity of given translation file(s).




Command Pre-processor directives
The Console also contains a powerful pre-processor which analyses the commands before the actual command interpreter, you can use these commands to control the command pre-processor.

>>
Name: Put
Syntax: Command >> "filename.txt"
Action: Saves the command's result to a file. Works only with commands which can show the results in Console window, so, for example, you can't use this command with the RegCleaner command.
Examples:
Dir >> "dirs.txt" - Saves directory listing to dirs.txt.
CmdList >> "supported_commands.txt" - Saves the list of supported commands to supported_commands.txt

<<
Name: Get
Syntax: (Command) << "filename.txt" (Command)
Action: Includes data from a file to the command. If the file contains many lines the program will replace all Linefeeds with spaces.
Examples:
You have two files in your current working dir, they are called file1.txt and file2.txt. File1.txt contains the word "-f" and File2.txt contains the word ""OnlyFiles2.txt"".
Dir << "file1.txt" - Executes the command Dir -f.
Dir << "file1.txt" >> "onlyfiles.txt" - Executes the command Dir -f and saves the results to onlyfiles.txt.
Dir << "file1.txt" >> << "file2.txt" - Executes the command Dir -f >> OnlyFiles2.txt.

|
Name: Pipe
Syntax: Command | Command2 ({})
Action: Gives the result of the first command as parameter to the second. If you want, you can specify where to insert the data from the previous command with the {} parameter.
Example:
WhereIs sol.exe | Run - Finds the Windows' Solitaire (sol.exe) and runs it with the Run command.
GetAppDir | View "{}\Documentation\index.html" - Finds the program's directory and uses that information to access this documentation's first page.
GetSysDir | cd - Goes to the Windows' system directory.

/NC
Syntax: /NC Command
Action: Runs the command without adding anything to the console cache.

If
Syntax: If ([command] = result) [ commands; ] else [ commands; ]
Action: Allows you to use If clauses in script files. You can use the following operators: =, >, <, <>, !=, >=, <=.
Example: If ([Hostname | sPos "x"] > 0) [ PrintMessage Your computer's name has an X!; ]
Note: You can also use the following syntax in script files:
If ([command] = result)
[
 command1;
 command2;
 ...
]
else
[
 command3;
 command4;
 ...
]

For
Syntax: For (VariableName := StartValue to EndValue, OneStep) [ commands; ]
Action: Executes a loop from StartValue to EndValue.
Example: For (i := 0 to 10, +1) [PrintMessage $i;]
Note: You can also use the following syntax in script files:
For (VariableName = StartValue to EndValue, OneStep)
[
 commands;
]
Note: The StartValue and EndValue must be either numbers or variable names.

FileLoop
Syntax: FileLoop (XFG) [ Commands; ]
Action: Executes a special loop that goes through all the files defined by the XFG entry.
Note: You can also use the following syntax in script files:
FileLoop (XFG)
[
Commands;
]
The following variables are available inside the file loop:
fFilename, fFileSize, fFileSizeKB, fFilePath, fFileExt, fFileOnlyName, fFileType.
Example: FileLoop ("C:\*.tmp" "$D:\Temp\*.*") [ PrintMessage $fFilename; ] - Lists all .tmp files from C:\ and all files under D:\Temp and its subdirectories in the console window.



Commands relating to the Internet

Web
Syntax: Web www.website.com
Action: Opens the web site with the default browser.

Google
Syntax: Google search words
Action: Opens the default browser and does a Google search with the search words.

FTPSearch
Syntax: FTPSearch search words
Action: Opens the default browser and does a ftp search with AllTheWeb search engine.

Usenet
Syntax: Usenet search words
Action: Opens the default browser and does an usenet search using Google.

News
Syntax: News search words
Action: Opens the default browser and does a search for news with Google.

Dic
Syntax: Dic search words
Action: Starts the default browser and opens the specified page from the Cambridge Online Dictionary (http://dictionary.cambridge.org).

wGet
Syntax: wGet http://www.website.com/file.txt
Action: Displays the contents of the file in console screen.
Notes: Uses IE for downloading the file. Remember to include the http:// part, this command doesn't work without it.

Download
Syntax: Download "C:\filename.txt" http://www.website.com/file.txt
Action: Downloads and saves a file to the disk.
Notes: Uses IE for downloading the file. Remember to include the http:// part, this command doesn't work without it.





Console commands
These commands are mainly for the console but can also be run from a script file if needed.

Cd
Syntax: cd (New directory)
Action: Changes the current working directory to another.
Examples:
Cd test - Changes the current working directory to a subdirectory called "test", if it exists.
Cd - Displays the current working directory.
Cd\ - Changes the current working directory to the root of the drive.
Cd.. - Changes the current working directory to the previous directory.
cd /home - Changes the current working directory to the home directory. See SetHomeDir.

Pwd
Action: Prints the current working directory.

Dir
Syntax: Dir ("directory") (-d) (-f)
Action: Lists the contents of a directory. If you do not give the directory as a parameter the current working directory is used. Give the D parameter to list only directories, F parameter to list only files.

WhereIs
Syntax: WhereIs Filename
Action: Does a quick search for a file and shows the result in Console.
Example: WhereIs "sol.exe" - Finds Sol.exe from your windows directory and prints the full path to the file to the Console screen.

Define Alias
Syntax: Define Alias "Alias"="Command"
Action: Defines a new command alias. For example, if you define "see you later" as an alias for the command "Exit" then the you can close the program by giving the "See you later" command. If you can't remember the order of the parameters, here's a tip: You are about to define an alias, so the alias comes first.
Example: Define Alias "See you later"="Exit"
Security privileges needed: Full access to the Define Alias command.

Man
Syntax: Man Command
Action: Shows information about the command, the information is read from this file.
Examples:
Man Grep - Shows information about the grep command.
Man man - Shows information about the man command.

Syntax
Syntax: Syntax Command
Action: Shows the command's syntax.
Example: Syntax Dir - Prints the dir command's syntax, i.e.: "Dir ("directory") (-d) (-f)"

Help
Syntax: Help topic
Action: Opens the documentation from the specific topic.
Example: Help FileTool - opens the documentation's file tool section. The sections are defined by the filenames.

GetIP
Action: Shows the computer's IP address(es).

GetMAC
Action: Shows the computer's mac address.

Hostname
Action: Displays the computer's name.

WhoAmI
Action: Displays your Windows' and jv16 PowerTools' username.

History
Syntax: History (N)
Action: Shows N last commands you have executed. If you don't define N the program will show the full command history.

CmdList
Syntax: CmdList (Letter) (-c) (-L)
Action: Lists all supported commands. If the C parameter is given the program also shows the total number of commands, if you give a letter as a parameter the program will only show commands starting with that letter. Use the L parameter to get the list of commands in a format of a list where there is only one command per line.
Examples
CmdList -C - Shows a list of all supported commands and the total amount of them.
CmdList G -C - Shows the list of all commands which start with the letter G and the total amount of those commands.

Cat
Syntax: Cat filename
Action: Shows the contents of a file.

XCat
Syntax: XCat [XFG]
Action: Shows the contents of files.

AsciiDump
Syntax: AsciiDump filename
Action: Extracts all ASCII text from a binary file.

Head
Syntax: Head N [XFG]
Action: Lists the first N lines of a file. This command should only be used with ASCII files.

Tail
Syntax: Tail N [XFG]
Action: Lists the last N lines of a file. This command should only be used with ASCII files.

ReadLine
Syntax: ReadLine N [XFG]
Action: Reads the Nth line of the file. This command should only be used with ASCII files.

ReadLines
Syntax: ReadLines N1 N2 N3 N4 ... [XFG]
Action: Reads the specified lines of the files. This command should only be used with ASCII files.

LineCount
Syntax: LineCount [XFG]
Action: Shows the amount of lines in specified files. This command should only be used with ASCII files.

SortList
Syntax: SortList [XFG] (-inv)
Action: Sorts the data inside files, use the Inv parameter to inverse the sort direction. Should only be used with ASCII files. Creates backups if so defined in the file tool.
Security privileges needed: Full access to the file tool.

TrimList
Syntax: TrimList [XFG] -t:10 (-m:0)
Action:
M = -1: Removes lines from the text files which are shorter than the value defined with parameter T. Does not remove empty lines.
M = 0: Removes lines from the text files which length is equal with parameter T.
M = 1: Removes lines from the text files which are longer than the value defined with parameter T.
If the M parameter is not defined the program uses a default value of 0.
Should only be used with ASCII files. Creates backups if so defined in the file tool.
Security privileges needed: Full access to the file tool.

Timer
Syntax: Timer (-f) (-m)
Action: Reads the current value of the timer. Use the F parameter to get the result in DD:HH:MM:SS format, otherwise the result is shown in seconds. Use the M parameter to get the result in milliseconds.

TimerStart
Action: Starts or initializes the timer. You can read the timer's value with the Timer command.

LineCmp
Syntax: LineCmp "Filename1" "Filename2" (-NoCase)
Action: Compares two ASCII files line by line. Give NoCase parameter to ignore case.

DevilTest
Syntax: DevilTest Name
Action: Tests if the given name (or any other data) corresponds the number 666. The test is not case sensitive.

Ver
Action: Shows the version of jv16 PowerTools.

Sys
Action: Shows the version of Windows, the amount of free and total ram, the amount of free and total page file, the amount of free and total virtual memory.

Env
Syntax: Env (Section)
Action: Shows the jv16 PowerTools' settings. If the Section parameter the program will only show the information from that section. You can see the sections' names by first running the Env without parameters.
Example: Env Console - Shows the Console settings.
Security privileges needed: At least a read-only level access to the Options.

Set
Syntax: Set "Section" "Name" "Value"
Action: Allows you to change the jv16 PowerTools' current and default settings. The changes you make will be saved to the Settings.dat file and loaded every time you start the program.
Examples :
Set "FileTool" "Backups" "True" - Tells the file tool to create backups.
Set "Console" "HomeDir" "C:\" - Sets the Console home path to C:\, actually, this is what the SetHomeDir command does.
Security privileges needed: Full access to the Options.

Hd
Syntax: Hd (C:\)
Action: Shows the free and total space of all harddisks if no drive letter was given as parameter.

HDInfo
Syntax: HDInfo (C:\)
Action: Shows the harddisks' name, serial number and file system. If the drive letter is not given as parameter the program lists the information of all the harddisks.

SetHomeDir
Syntax: SetHomeDir Directory
Action: Sets the default working directory. If user has not set it the default working directory is the directory where jv16 PowerTools is installed.

GetFixedDrives
Action: Shows the list of fixed drives of the computer.

SaveScreen
Syntax: SaveScreen Filename.txt
Action: Saves the console screen to a text file.

Uptime
Action: Shows the Windows uptime.

GetSysDir
Action: Shows the Windows' system directory path, usually C:\Windows\System\.

GetWinDir
Action: Shows the Windows' directory path, usually C:\Windows\.

GetTempDir
Action: Shows the system Temp directories.

GetAppDir
Action: Shows the jv16 PowerTools' directory path, usually C:\Program files\jv16 PowerTools\.

GetHomeDir
Action: Shows the console home directory. By default this is the jv16 PowerTools' directory.

GetTickCount
Action: Shows the number of milliseconds that have elapsed since Windows was started.

Parse
Syntax: Parse "Filename" "Mask"
Action: Allows you to test the filename parser. Shows the result in the console screen.
Examples:
Parse "Test.exe" "*.exe" - Shows "True"
Parse "Test.exe" "*.dll" - Shows "False"
Click here for more info about the filename parser.

RebuildIcons
Action: Rebuilds all currently cached icons, this helps to solve some icon problems.

Login
Syntax: Login "User" "Password"
Action: Logs in to the program as "User" using password "Password".

Logout
Action: Logs off from jv16 PowerTools.
Security privileges needed: Full access to the Logout command.

Kill
Syntax: Kill Filename.exe
Action: Terminates a running task.
Security privileges needed: Full access to the Kill command.

ResetHardwareConfiguration
Action: Resets the Windows' hardware configuration. After a reboot you must reinstall all the device drivers. This procedure is very extreme and should only be used by advanced users as the last try before reinstalling Windows. Works only in Win9x systems.
Security privileges needed: Full access to the ResetHardwareConfiguration command.

Ignore
Syntax: Ignore word
Action: Adds a word to the registry cleaner's ignore list.

Sleep
Syntax: Sleep N
Action: Waits (i.e. does nothing) for N milliseconds. One second is 1000 milliseconds.

Screen
Action: Shows the data that has already been written to the Console screen.





Date and time commands

Date
Action: Displays current date in the program's date format (as defined in the options).

DateF1
Action: Displays the current date in DD.MM.YYYY HH:MM:SS format.

DateF2
Action: Displays the current date in DD.MM.YYYY HH:MM format.

DateF3
Action: Displays the current date in DD.MM.YYYY format.

Time
Action: Displays the current time in HH:MM:SS format.

TimeF1
Action: Displays the current time in HH:MM format.

TimeF2
Action: Displays the current time in HH:MM AM/PM format.

DateCmp
Syntax: DateCmp "Date1" "Date2"
Action: Returns the difference between two dates.
Note: The dates must be in DD.MM.YYYY format.

DayOfWeek
Action: Returns the name of the current day in three letter format.

IsLeapYear
Syntax: IsLeapYear (Year)
Action: Returns if the specific year is a leap year or not. If no year is given as a parameter the command returns the status of the current year.

DateTimeFormat
Syntax: DateTimeFormat "DateFormat"
Action: Returns the current date and/or time in the specified format.
Examples:
DateTimeFormat "DD.MM.YYYY" - Returns: 30.06.2003
DateTimeFormat "DDDD.MMMM.YYYY" - Returns: Monday.June.2003
DateTimeFormat "HH:MM" - Returns: 12:13
DateTimeFormat "HH:MM am/pm" - Returns: 12:13 am





User interface commands

ShowMessage
Syntax: ShowMessage data
Action shows the data with a message box.

ShowMessageEx
Syntax: ShowMessageEx [None/Warning/Error/Confirmation/Info] [OK/OKCancel/YesNo/YesNoAll/AbortRetry] "data"
Action: Shows the data in a message box with user defined icon and buttons.
Example: If ShowMessageEx Confirmation YesNo "Do you want to play solitaire?" = Yes then Run sol.exe

InputBox
Syntax: InputBox "Window caption" "text" ("default value")
Action: Shows an input box with user defined values.
Example: InputBox "run a program" "Give the name of the program to run" "notepad.exe" | Run

SaveFileDialog
Syntax: SaveFileDialog "Window caption" "filter" ("initial directory")
Action: Shows a save file dialog. The filter parameter defines the allowed file types, the syntax is: Description|mask. E.g. "All files|*.*". You can also define multiple options, e.g."Text files|*.txt|All files|*.*".
Example: SaveFileDialog "Save the screen to a file" "text files|*.txt|all files|*.*" | SaveScreen

OpenFileDialog
Syntax: OpenFileDialog "Window caption" "filter" ("initial directory")
Action: Shows an open file dialog. The filter parameter defines the allowed file types, the syntax is: Description|mask. E.g. "All files|*.*". You can also define multible options, e.g."Text files|*.txt|All files|*.*".
Example: OpenFileDialog "Select the file to analyse" "text files|*.txt|all files|*.*" | CRC "{}"

PrintMessage
Syntax: PrintMessage data
Action: Shows the data in the Console screen.





Window commands
These commands allows you to access all the running windows. Many of these commands need the WindowID as the parameter, you can retrieve it with e.g. the FindWindowT command. The WindowID is a special ID code which is used to identify windows.

FindWindow
Syntax: FindWindow WindowName
Action: Returns the Window's WindowID.

FindWindowC
Syntax: FindWindowC ClassName
Action: Returns the Window's WindowID.

FindWindowT
Syntax: FindWindowT WindowTitle
Action: Returns the Window's WindowID based on the window's title. The title is not case sensitive and the parameter doesn't have to be the full title.

ClickEx
Syntax: ClickEx WindowID ButtonCaption
Action: Clicks a button in any Windows application. Returns True if the program was able to click the button.
Note: If the button's caption contains underlined letters use ampersand, for example if the button's caption is: "Cancel" then you must use "&Cancel" as a parameter for this command.

SendClick
Syntax: SendClick X Y [Left/Right/Double]
Action: Sends a virtual mouse click to the specific place on the screen. The last parameter defines if the click is a normal click, right click or a double click.

GetTopWindow
Action: Returns the WindowID of the top most window.

BringWindowToTop
Syntax: BringWindowToTop WindowID
Action: Makes the window top most.

CloseWindow
Syntax: CloseWindow WindowID
Action: Minimizes the window.

IsWindow
Syntax: IsWindow WindowID
Action: Returns True if the window exists, otherwise returns False.

IsWindowVisible
Syntax: IsWindowVisible WindowID
Action: Returns True if the window is visible, otherwise returns False.

ShowWindow
Syntax: ShowWindow WindowID [Show/Maximize/Minimize/Restore/ShowNoActivate/Hide]
Action: Allows you to modify window's state.

SetWinTrans
Syntax: SetWinTrans N WindowID
Action: Sets the window's transparency to N percent. Works only under Win2000/XP.

GetWinPos
Syntax: GetWinPos WindowID
Action: Retrieves the window's position.

GetWinPosX
Syntax: GetWinPosX WindowID
Action: Retrieves the window's position's x coordinate.

GetWinPosY
Syntax: GetWinPosY WindowID
Action: Retrieves the window's position's y coordinate.

GetWinSize
Syntax: GetWinSize WindowID
Action: Retrieves the window's size.

GetWinSizeW
Syntax: GetWinSizeW WindowID
Action: Retrieves the window's width.

GetWinSizeH
Syntax: GetWinSizeH WindowID
Action: Retrieves the window's height.

ResizeWindow
Syntax: ResizeWindow WindowID Width Height
Action: Resizes the specific window. Enter 0 as the width or height parameter to maintain its the current value.
Examples:
FindWindowT Notepad | ResizeWindow {} 0 100 - Sets the Notepad's height to 100 units, doesn't change width of the window.
FindWindowT Notepad | ResizeWindow {} 100 100 - Sets the Notepad's height and width to 100 units.

MoveWindow
Syntax: MoveWindow WindowID X Y
Action: Moves the specific window to a new position. Enter 0 as the X or Y parameter to maintain its current value.

ScreenShot
Syntax: ScreenShot filename.bmp
Action: Creates a screen shot of the entire screen and saves it to a bmp file.

ScreenShotW
Syntax: ScreenShot WindowID filename.bmp
Action: Creates a screen shot of the window and saves it to a bmp file.

GetWindowText
Syntax: GetWindowText WindowID
Action: Retrieves the window's caption.

SetWindowText
Syntax: SetWindowText WindowID Text
Action: Changes the window's caption.




Mathematical functions

Calc
Syntax: Calc formula
Action: Calculates a mathematical formula.
Supported operations:
x + y , x - y , x * y, x / y, x ^ y, x mod y, Abs(x), Frac(x), Trunc(x), Heaviside(x) or H(x), Sign(x), Sqrt(x), Ln(x), Exp(x), Cos(x), CTg(x), Ch(x), CTh(x), Sin(x), Sh(x), Tg(x), Th(x), ArcSin(x), ArcCos(x), ArcTg(x), ArcCtg(x).
Supported constants:
Pi, e (Natural Logarithmic Base), y (Euler's Constant), GR (Golden Ratio), g (Acceleration due to gravity), Ga (Catalan's constant).
Examples:
Calc 1+2
Calc (1+5)*(2-6)
Calc 2*sin(30)
Powered by Calcul from www.tsoft.szm.com

Inc
Syntax: Inc N
Action: Increases N's value by one.
Example: Inc 7 - Returns: 8.

Dec
Syntax: Dec N
Action: Decreases N's value by one.
Example: Inc 7 - Returns: 6.

InvBool
Syntax: InvBool N
Action: Inverses the boolean value N. Works with "True" and "False" but also with "1" and "0".
Examples:
InvBool True - Returns: False
InvBool 0 - Returns: 1

IsPrime
Syntax: IsPrime N
Action: Tests whether N is a prime number or not. Returns True if N is a prime number and returns False if it's not.

IsNumber
Syntax: IsNumber N
Action: Returns True if N is an integer number, returns False if it's not.

Round
Syntax: Round N
Action: Rounds a number to the nearest whole number.
Example: Round 1.5 - Gives 2.

Int
Syntax: Int N
Action: Returns the number's integer part.

Frac
Syntax: Frac N
Action: Returns the number's fractional part.

Rnd
Syntax: Rnd (N)
Action: Generates a random number and shows it in the Console. If the parameter N is given the program will only generate random numbers smaller than N.

IntToHex
Syntax: IntToHex N
Action: Converts the specific number to a hex number.





Filters and other string commands
These commands allows you to filter data and modify text data in many ways. These commands might become very handy when working with pipes and scripts.

StrCmp
Syntax: StrCmp "Data1" "Data2"
Action: Compares two strings.
Returns:
< 0  Data1 < Data2
= 0  Data1 = Data2
> 0  Data1 > Data2

InsQ
Syntax: InsQ data
Action: Inserts the data inside quotation marks (""s).
Example: InsQ filename.exe - Shows: "filename.exe"

qPacket
Syntax: qPacket data
Action: Puts words inside quotation marks. If the data already contains parts with quotation marks they will be ignored.
Examples:
qPacket filename1.txt filename2.dat - Shows: "filename1.txt" "filename2.dat"
qPacket "data1" data2 data3 "data4" - Shows: "data1" "data2" "data3" "data4"

qUnPacket
Syntax: qUnPacket data
Action: Removes all the quotation marks from the data.
Example: qUnPacket "filename1.txt" "filename2.dat" - Shows: filename1.txt filename2.dat

qStrip
Syntax: qStrip "data"
Action: Removes the quotation marks (""s) from the beginning and the end of the data.
Example: qStrip"filename.exe" - Shows: filename.exe

bStrip
Syntax: bStrip data
Action: Removes the Tab and Enter keys from the data.

hStrip
Syntax: hStrip data
Action: A very basic html parser. Removes comments and tags.

StripNum
Syntax: StripNum data
Action: Retrieves the first number from the data.
Example: StripNum Testing 123 foo - Returns 123.

StripNums
Syntax: StripNums data
Action: Retrieves all the numbers from the data.
Example: StripNum Testing 123 foo 567 foobar - Returns 123 567

GetListItem
Syntax: GetListItem N data
Action: Returns the Nth item of a list, first item is number 1, second is 2 and so on.
Example:
Data:
Foo
Foobar
Testing
GetListItem 1 Data - Returns: Foo
GetListItem 3 Data - Returns: Testing

GetListItemEx
Syntax: GetListItem "Separator" N data
Action: Returns the Nth item of a list, first item is number 1, second is 2 and so on.
Examples:
GetListItemEx "," 2 Test,foo,foobar,123,testing - Returns: foo
GetListItemEx "," 5 Test,foo,foobar,123,testing - Returns: testing

GetListItemCount
Syntax: GetListItemCount data
Action: Returns the amount of data in the list.
Example:
Data:
Foo
Foobar
Testing
GetListItemCount Data - Returns: 3.

ListToString
Syntax: ListToString data
Action: Converts a list to a string.
Example:
Data:
Foo
Foobar
Testing
ListToString Data - Returns: "Foo" "Foobar" "Testing".

StringToList
Syntax: StringToList data
Action: Converts a string to a list.
Example: StringToList "Foo" "Foobar" "Testing"
Returns:
Foo
Foobar
Testing

ExpandTree
Syntax: ExpandTree data
Action: Expands a data tree. See the example.
Example:
ExpandTree aaa\bbb\foo\ccc\
Returns:
aaa\
aaa\bbb\
aaa\bbb\foo\
aaa\bbb\foo\ccc\

ExpandTreeEx
Syntax: ExpandTreeEx Separator data
Action: Expands a data tree. See the example.
Example:
ExpandTreeEx . aaa.bbb.foo.ccc.
Returns:
aaa.
aaa.bbb.
aaa.bbb.foo.
aaa.bbb.foo.ccc.

UpOneDir
Syntax: UpOneDir Directory
Action: Returns the full path of the previous directory in the given path.
Example:
UpOneDir C:\Windows\Temp\ - Returns: C:\Windows\
UpOneDir C:\Windows\Temp\foo - Returns: C:\Windows\Temp\

LCase
Syntax: LCase data
Action: Converts the data to lower case.

UCase
Syntax: UCase data
Action: Converts the data to upper case.

ECase
Syntax: ECase data
Action: Converts the data to elite style.
Example: ECase elite style - Shows: eLiTe STyLe

3Case
Syntax: 3Case data
Action: Converts the data to true 3L1T3 style.
Notes: Don't worry if you don't get the idea of this command, only worry if you get.
Example: 3Case elite style - Shows: 3L1T3 STyL3

iCase
Syntax: iCase data
Action: Inverts the data's case.

TrimLeft
Syntax: Trimleft N data
Action: Removes the N first characters from the data starting from the left.

TrimRight
Syntax: TrimRight N data
Action: Removes the N first characters from the data starting from the right.

sTrim
Syntax: sTrim data
Action: Removes the empty space from the beginning and the end of the data.

sCopy
Syntax: sCopy N1 N2 Data
Action: Retrieves N2 characters of the data starting from N1.
Example: sCopy 8 4 Hello, testing 123 - Returns: test

sPos
Syntax: sPos "data1" data2 (-Case)
Action: Finds where data1 starts inside of data2. Give the Case parameter to make the search case sensitive.
Example: sPos "test" Hello, testing 123 - Returns: 8

sLastPos
Syntax: sLastPos "data1" data2
Action: Finds the last position of the data1 from data2. The search is not case sensitive.
Example: sLastPos "f" foo foo foo - Returns: 9 (I.e. the position where the last "foo" starts)

sCount
Syntax: sCount "data1" data2 (-Case)
Action: Counts how many time data1 can be found from data2.
Example sCount "12" Testing 123 - Returns: 1.

sCombine
Syntax: sCombine "data1" "data2"
Action: Combines the input data.
Example: sCombine "Hel" "lo!" - Returns: Hello!

sCombineEx
Syntax: sCombineEx data1 data2 data3 data4 ...
Action: Combines the input data. Becomes handy when you must combine the value of many variables into one string.

sEnvVar
Syntax: sEnvVar %Environment_variable%
Action: Returns the value of the specified Windows' environment variable, such as %WINDIR%.

sRem
Syntax: sRem Character data
Action: Removes the specified character from the data. The search is case sensitive.
Example: sRem o Foo 123 testing - Returns: F 123 testing

sRemDoubleBackSlash
Syntax: sRemDoubleBackSlash data
Action: Removes all double back slashes from the data.
Example: sRemDoubleBackSlash C:\foo\\bar\ - Returns: C:\foo\bar\

sDelete
Syntax: sDelete Index Count data
Action: Removes data from the string.
Example: sDelete 2 1 Testing - Returns: Tsting.

sReplace
Syntax: sReplace Character1 Character2 data
Action: Replaces the specified character with another character from the data.
Example: sRep g ' Testing - Returns: Testin'

sLength
Syntax: sLength data
Action: Calculates the length of the data.

sExtractData
Syntax: sExtractData dataname data
Action: Extracts the data from the following data structure: Dataname="data".
Example: sExtractData Filename Filename="c:\file.txt" - Shows: c:\file.txt

ExtFileName
Syntax: ExtFileName filename
Action: Extracts the filename part of a full path to a file.
Example: ExtFileName C:\test\foo.exe - Returns foo.exe

ExtFileDir
Syntax: ExtFileDir filename
Action: Extracts the directory part of a full path to a file. Result always ends to a backslash.
Example: ExtFileDir C:\test\foo.exe - Returns C:\test\

ExtFileExt
Syntax: ExtFileExt filename
Action: Extracts the file's extension.
Example: ExtFileExt C:\test\foo.exe - Returns .exe

ExtFileLength
Syntax: ExtFileLength filename
Action: Extracts the length of the file's name, doesn't include the possible file path.
Example: ExtFileLength C:\Windows\sol.exe - Returns: 7

RemBackSlash
Syntax: RemBackSlash data
Action: Removes the trailing backslash from the data.
Example: RemBackSlash C:\Dir\ - Returns C:\Dir

InsBackSlash
Syntax: InsBackSlash data
Action: Adds a backslash at the end of the data. If there already is one doesn't do anything.
Examples:
InsBackSlash C:\Dir  - Returns C:\Dir\
InsBackSlash C:\Dir\ - Returns C:\Dir\

RemSlash
Syntax: RemSlash data
Action: Removes the trailing slash from the data.
Example: http://www.example.org/ - Returns http://www.example.org

InsSlash
Syntax: InsSlash data
Action: Adds a slash at the end of the data. If there already is one doesn't do anything.
Examples:
InsSlash http://www.example.org  - Returns http://www.example.org/
InsSlash http://www.example.org/ - Returns http://www.example.org/

InsAsLastCharacter
Syntax: InsAsLastCharacter Character Data
Action: Inserts Character as the last character of Data. If the Character is already the last character of Data then the command does nothing.
Examples:
InsAsLastCharacter \ C:\foo  - Returns: C:\foo\
InsAsLastCharacter \ C:\foo\ - Returns: C:\foo\

FilesizeToBytes
Syntax: FilesizetoBytes FileSize
Action: Converts the given file size to bytes.
Example: FilesizetoBytes 12 KB - Returns: 12288

FilesizeToKBytes
Syntax: FilesizetoKBytes FileSize
Action: Converts the given file size to kilobytes.
Example: FilesizetoKBytes 5 MB - Returns: 5120

FilesizeToMBytes
Syntax: FilesizetoMBytes FileSize
Action: Converts the given file size to megabytes.
Example: FilesizetoMBytes 100 GB - Returns: 102400

sLine
Syntax: sLine N
Action: Gets the Nth line of the console screen. The last line of the screen is line number 1 (line 0 is the last command, in this case the sLine).

Ascii
Syntax: Ascii data
Action: Shows the data's first character's ascii code.

AsciiToChar
Syntax: AsciiToChar N
Action: Converts the specific ascii code to a character. Supports all ascii codes, including special key codes.

Rot13
Syntax: Rot13 data
Action: A simple encryption method that rotates the letters by 13. Use this command to encrypt, use it the second time to decrypt.
Notes: Should not be used as a real encryption method.

StrToBase16
Syntax: StrToBase16 data
Action: Encodes the data using a base16 encoding.

Base16ToStr
Syntax: Base16ToStr data
Action: Decodes the base16 encoded data.

StrToBase64
Syntax: StrToBase64 data
Action: Encodes the data using a base64 encoding.

Base64ToStr
Syntax: Base64ToStr data
Action: Decodes the base64 encoded data.

ClpCopy
Syntax: ClpCopy data
Action: Copies data to the Windows' clipboard.

ClpPaste
Action: Pastes the data from the Windows' clipboard.

iCopy
Syntax: iCopy data
Action: Copies the data to the PowerTools' clipboard.

iPaste
Action: Pastes the data from the PowerTools' clipboard.

RndText
Syntax: RndText N
Action: Generates random text. Parameter N defines the length of the data.

RndAscii
Syntax: RndAscii N
Action: Generates random ASCII data. Parameter N defines the length of the data.

RndHex
Syntax: RndHex N
Action: Generates random hex data. Parameter N defines the length of the data.

RndBin
Syntax: RndBin N
Action: Generates random data. Parameter N defines the length of the data.

EvalPswd
Syntax: EvalPswd data
Action: Analyses the data and says how good it would be as a password. The command's result is a number, the bigger number the better password the data would be.

RegExp
Syntax: RegExp "Expression" data
Action: Analyses the data using the specific regular expression. The RegExp engine is created by Henry Spencer, ported to Delphi by Andrey V. Sorokin (http://anso.da.ru).





Variable operators
The .jvb script file scripting language supports variables, you can use them with these commands.

Define
Syntax: Define VariableName (Value)
Action: Defines a new variable.
Notes: Variable names cannot contain a space nor any special characters, it can only contain letters and numbers. A variable name cannot, of course, be a reserved command name (see the list of commands with the CmdList command). The variables are stored in the memory as long as the PowerTools is running or the variable is cleared by ClearVar or ClearVars command. Variable names are not case sensitive.
Examples:
Define Filename - Defines a variable called "Filename".
Define Size 0 - Defines a variable called "Size" and sets its value to 0.

:=
Syntax: VariableName := NewValue
Action: Sets a new value to a variable. The variables must, of course, be defined before use.
Examples:
X := "Hello World" - Sets the value of X to 'Hello World'.
X := "3 + 3 equals " [Calc 3+3] - Sets the value of x to '3 + 3 equals 6'.
X := [Calc x+1] - Increases x's value by one.

ClearVar
Syntax: ClearVar Name
Action: Removes a variable from the memory.

ClearVars
Action: Removes all variables from the memory.

ListVars
Action: Lists all defined variables

VarExt
Syntax: VarExt Name
Action: Returns "True" if variable exists, returns "False" if it doesn't.

SwapVars
Syntax: SwapVars Name1 Name2
Action: Sets the first variable's value to the second one and vice versa.

CombVars
Syntax: CombVars BaseVar Name1 Name2
Action: Combines variables.
Examples:
CombVar v1 v1 v2 - Combines v1's and v2's values and sets it as v1's new value.
CombVar v1 v2 v3 - Combines v2's and v3's values and sets it as v1's new value.

CombVar
Syntax: CombVar VarName Data
Action: Returns the sum of the Variable's content and the data.
Example:
(Var1 := "foo")
CombVar Var1 bar - Returns "foobar".

SaveVars
Syntax: SaveVars filename
Action: Saves all the defined variables to a file.

LoadVars
Syntax: LoadVars filename
Action: Clears all the currently defined variables and loads the variables from the file.

LoadVarsA
Syntax: LoadVarsA filename
Action: Keeps all the currently defined variables and loads new variables from the file.


Notes

List of available window names
Some commands require the specific tool's Window's name as a parameter. Here's the list of jv16 PowerTools Windows' names.

Window's name Meaning
MainWindow The program's main window
RegManager The Registry manager
RegCleaner The Registry cleaner
RegFinder The Registry finder
RegMonitor The Registry monitor
FileTool The File tool
ScriptManager The Script manager
ScriptEditor The Script editor
Access Control The Access control window
Backups The Backups tool
Options Options window
RemSoftware The Custom remove software window
Console The Console window
APS Advanced Password System window
About The About screen
.:: Copyright 2000-2003 Jouni Vuorio