You should find here some freewares I have made.
Basically, it is a program I have made to redirect calls to Window's Notepad (mainly by Internet Explorer when I ask to View source of a Web page) to a program of my choice.
In other words, this is a replacement for notepad.exe or other programs that are inconditionaly launched by another application.
You may need it if you are tired to view the source of Web pages in IE using Notepad.
ProgLauncher allows you to use the text editor of your choice, be it a lightweight Notepad alternative (like Metapad or The Gun) or a lightweight syntax highlighting editor (like SciTE) or even a big HTML editor which can't be moved from its installation directory.
You can also use it to redirect calls to any program made by any application which doesn't let
its users to choose which program to use.
These programs can be text editors, of course, but also image viewers, diff utilities, etc.
Other advantage: you may be updating often your editor,
and have several locations of Notepad.
For example, I help improving SciTE so I always have a fresh copy in the development directory, a copy in Program Files, and I had to do a copy in the Win98 directory, and another for WinNT, which have two copies of Notepad. That's 4 copies to update.
I had a batch file to update all these copies, but it was quite a hassle. Now, I just have to update the main copy of my editor, and I no longer touch the files in my system directories.
ProgLauncher 1.0 (less than 25KB).
The source code is distributed with it, but your really need only ProgLauncher.exe and NotePad.cfg (to rename and/or edit, as explained below).
It's aim is to replace the binary of the program that is ran.
To this end, rename the old program, say <ProgramName>.exe becoming <ProgramName>_old.exe,
or move it to another directory. I recommand to keep a copy in case you change your mind or
if you need someday to launch the standard version.
Then rename ProgLauncher.exe to <ProgramName>.exe (eg. rename it NotePad.exe) and move it to the directory where the old program was.
When your application will try and run the old program, it will launch instead the disguised ProgLauncher which in turn will run the program of the user's choice.
This choice is defined in the <ProgramName>.cfg file (eg. NotePad.cfg), found in the same directory as the .exe file.
This file have three lines (the following ones are ignored and can contain comments):
Note 1: in old Win95 versions, system is making track of the rename of notepad.exe, and still call the old exe. In this case, you have to make a copy for backup, instead of renaming it, and overwrite the old file.
Note 2: in new Windows versions (namely Windows 2000 and newer), system is auto-repairing, ie. if it notices you have changed a system file (and Notepad is one of them), it will restore the original file.
Workaround found in Lockergnome:
Those who pay attention to the GnomeREPORT know that I've replaced Notepad with Metapad as my default text editor (which came from welcome.to/metapad). In Windows 98, I simply renamed the binary and threw it into my Windows folder. When I tried to do the same in Windows 2000, the operating system wouldn't let me. Within seconds, it would reverse my replacement. What!? That's a nice safeguard, but I really wanted to use the Metapad binary. In a matter of minutes, I discovered that files in the "WINNT \ system32 \ dllcache" folder were my problem. Upon replacing its copy of Notepad with the Metapad binary, I was saved. Of course, not before being warned about the issues which may have come up (which haven't yet). Now, if you care to stop this auto-recovery from ever happening again, you'll need to launch your registry editor. Navigate to "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon" and look for the "SFCDisable" DWORD value. Set it to "1" and you'll be good to go.
Note 3: in Windows NT 4, Notepad can be found in two locations:
C:\WinNT\ and C:\WinNT\System32 (if it is installed in the default directory; Replace
C:\WinNT by whatever is in your system).
You have to replace both copies, as either one can be called.
A command line calculator.
It is based on the excellent MathParser library, written by Kirill Zaborski.
You don't :-)
Well, if you love typing in a Dos/Cmd box, you may find it useful...
Otherwise, it can be used in a batch file to do computations, or in a script written in a language not supporting complex math operations.
For example, AutoIt.
Actually, I made it specifically for AutoIt, since I support most of the input modes AutoIt support: plain file (via redirection of standard output), .ini file and clipboard.
Here: MPCalc 1.1.1 (less than 10KB).
See the test.aut file in the Zip file. It shows common uses of this program.
Also read the MathParser.rtf file for further information.
If you run MPCalc without command line parameters, you get the following information:
MPCalc 1.1 by Philippe Lhoste, based on Kirill Zaborski's MathParser (http://kirya.narod.ru/mathparser.html). MPCalc evaluates the mathematical expression you give on the command line. Usage: MPCalc [@inifilename'section'key | '[clipboard]] math expression If the @ command is present (first one, excludes the ' command), MPCalc will write the result in the inifilename.ini file (in the current directory), under the given section and key (no spaces). If the ' command is present (first one, excludes the @ command), the result is put in the Windows clipboard. Otherwise, the result goes to stdout.
A shbang utility for Windows, ie. a script program starter.
You don't :-)
Here: StartScript 1.0 (less than 18KB).
I will lazily just paste here the content of the ReadMe.txt file in the Zip file...
This program takes a script filename as argument, possibly followed by the script arguments. The first line of the script file should be in the form of a Unix shbang #! (sharp bang). If StartScript find these characters, it take the remainder of the line as the path of a script interpreter executable, plus additional parameters for this interpreter. It will concatenate the name of the script and its arguments to this path, and run this command line.
In other words, it will act like a Unix shell, running a script interpreter indicated by the script file itself. Note that you can omit the path, in the shbang line, as long as the program is in the shell path. StartScript verifies the existence of the exe; if not found (or if no shbang line), it will fall on a default call. You must enclose the path in double quotes if it has spaces.
I made StartScript because I am starting to have several specialized Lua interpreters (one for Win32, one for testing an API, plus the official Lua 4.0, and the experimental Lua 5.0, etc.). The classical (Windows) way to handle these various executables would be to create a separate extension for each (eg. wlua, foolua, lua4, lua5...) and make an assocation (in registry) for each of them. This pollutes the namespace of HKEY_CLASSES_ROOT and brings the risk of extension collision with another program (installed or future, Lua related or not). So I chose to use the shbang, and since I already have a lot of scripts without shbang lines, I added a mechanism to retreive a default script if none is given, or if the given one is not good (not found in path). And while I was at it, I made it versatile enough to support any number of unrelated interpreters (whatever scripting language).
Previously, I associated in the registry (HKEY_CLASSES_ROOT) the .lua extension to luafile which had the form:
[HKEY_CLASSES_ROOT\luafile] @="Lua: program" [HKEY_CLASSES_ROOT\luafile\DefaultIcon] @="D:\\ProgCmdLine\\Lua.exe,-1" [HKEY_CLASSES_ROOT\luafile\shell\open\command] @="\"D:\\ProgCmdLine\\Lua.exe\" -c -f \"%1\" %*"
With StartScript, I changed the command to:
[HKEY_CLASSES_ROOT\luafile\shell\open\command] @="\"D:\\ProgCmdLine\\ScriptStart.exe\" \"%1\" %*"
With this registry key, you can start scripts from the Explorer by double-clicking on them, hitting Return when selected, dragging file on them, etc.
On WinNT/2k/XP, with cmd.exe command line interpreter, you can also start scripts from the command line, just by typing the name of the script and its parameters: FooBar.lua infile.txt outfile.txt
On Dos-based Win9x/Me with command.com, you are out of luck since Dos will not look in the registry. As a workaround, you can rename StartScript.exe to something shorter, like ss.exe or go.exe or even g.exe. You can then start a script by typing something like: go FooBar.lua infile.txt outfile.txt
To use the default interpreter mechanism, put in the same directory as the executable a text file named as the executable, but with a .cfg extension.
For example, if you use StartScript.exe, you should have a StartScript.cfg file defining the default interpreters, depending on the extension. The format of this file is simple: each line as an extension (without dot) followed by a tab and the path and command line arguments of the interpreter.
Go to main page. Contact me, comment this
Updated: 2007/04/16 (added read me for StartScript, at long last!)