Archive for the ‘My Programs’ Category

Here is a program that I use to quickly get the images off my flash cards. It's a very simple program; you tell it where the photos are that you want and where you want to put them and it does the rest. It is pretty specific and it does not have much flexibility, so if you happen to like the way it organizes the photos then you'll be happy, but if you want some features added, shoot me an email and I will probably incorporate it.

You can pretty much see from the image below how the photos will be organized in your destination directory. Basically, it creates a "year" folder and a day folder within that. If the file already exists in the destination it will not copy it there. As it copies files it will check to see if it can find image orientation information and will rotate the file accordingly.

I like to use shoot raw together with a small jpeg file. I use the raw as the digital negative and the jpeg as a quick proof of the image. Generally I try to get it right in the camera, and it's also a lot quicker if I just want to take some snapshots and make them quickly available for viewing. Currently it only works with .raw and .jpg extensions, so if you need a different extension let me know and I will add it. I hope you find this useful even though it is a little limited.

Click on the thumbnails below for a closer look...

Download the Program here

5-21-2009-10-53-00-amHere is a small utility to more easily email photos with Microsoft Outlook. Basically, it allows you to embed images in the body of the email message so that it is easier for the recipient to view the files.

5-20-2009-2-42-02-pmDownload the file using the link below. Once downloaded, install it by double-clicking it. To use the program, simply highlight the photos you wish to send, then right-click one of the highlighted images and select "Send-To" then "Image Mailer for Outlook". Image Mailer will resize the images to an appropriate size for e-mailing if necessary and then automatically create the e-mail for you with the images embedded in the body of the message. (Click the small image to the right for a better idea...)

5-27-2009-11-48-18-am

If you wish to change settings, like how large the image is when it's in the body of the message, you can use the settings editor included. Simply click on Start, All Programs, Deciacco.com, Image Mailer, and finally Settings.

There are three basic settings to choose from. The best settings for most people will be selected by default, but you may choose something to better fit your needs. Try experimenting with the different settings to see what suits you best.

Please note that while we have made are best efforts to insure its function you use this program at your own risk. In other words, you can use this program, but we don't want to get sued.

Please check back here for version updates and if you find a bug or would like an enhancement, feel free to leave a comment on this post or contact me directly via the e-mail on my contact page.

Click here to download the Windows 98 and up installer (2.1Mb)

I decided to write a small utility to quickly and easily resize images.

3-3-2009-10-19-53-pm

I wrote in PHP, and while PHP is mostly a "Web" language, it actually worked out quite nicely. You simply right-click an image or a folder containing images and select the appropriate command. Currently, the program supports JPEG, GIF, and PNG images. The original image remains intact as a new, resized version is created.

Installing

You can simply download the installer and run it on your computer. After the install, you will have an Image Resizer folder in your Start Menu as well as some new context menu(right-click) entries.

Launching

To start the program simply right-click on an image file and select "Resize Image". If you want to resize multiple files, right-click on the folder containing the images and select "Run Image Resizer On".

Program Settings

When you launch Image Resizer, it needs some information from you. You can specify this information in one of two ways. First, you can run it in interactive mode, where it will require you to input the settings every time. This is good when you require different image sizes often. Second, you can run Image Resizer in silent mode where you predefine the settings in the settings file. (The settings file is located in the program directory and shortcut to it is created in the program group in the Start Menu.) This is especially useful if you use Image Resizer to resize images before you send them in an email. Below are the required entries:

  1. Target Size
    • The maximum height or width in pixels the re-sized image can be. The aspect ratio will not change, therefore whichever side of the image is the longest will need to be the side to fit within the target size.
  2. Resized Image Postfix
    • Something to append to the end of the re-sized file's name.
    • Example: By taking the default value of "_resized", the image "silvesterkitty.jpg"
      will be copied and resized to "silvesterkitty_resized.jpg".
  3. Quality
    • The quality of the resized image. The higher the quality means the less atifacting will occure on the image and the final result is a more crisp looking image at the cost of higher file size.

*Note: To run image resizer in Silent mode, open the settings file and set "Silent" equal to 1.

**Note: Image Resizer always reads the values from the settings file, whether in interactive or silent mode. If in interactive mode, the values from the settings are used as the defaults.

Uninstalling

To uninstall, use the Windows uninstall utility from the control panel. All files, shortcuts,  and registry entries are removed.

Revision History

  • 0.1.3 - 03/03/2009
    • added the ability to run on a single file or by selecting multiple files
    • removed the ability to drag and drop; not needed as right-click is sufficient
    • removed the launch icon from the start menu
    • renamed the ini file shortcut in the program group to make more sense
    • added documentation to the settings file
    • fixed bug in installer when installing on Vista 32bit that caused the wrong registry entry to be installed which in turn caused the program to not lauch from the context menu
  • 0.1.2 - 02/16/2009
    • added installer
    • changed the resizing algorithm
    • no longer uses width and height, but uses a target size
  • 0.1.1 - 04/03/2008
    • cleaned up the registry entry to launch the php file itself instead of cmd.exe
    • the "Run Image Resizer On" context menu extension does not show when right-clicking the Recycle Bin

Download

Download Installer for XP, Vista here (3MB)

You can find more information on PHP at http://www.php.net/
Find some cool icons at the Icon Drawer - http://www.icondrawer.com/free.php
Special thanks to BojanM for contributing to this utility.

NOTE: This is a first draft, alpha code release.

Whenever you are working with Microsoft's SQL server you inevitably have to write some Transact SQL code.

I'm currently working on a data migration script and I found I'm using similar code over and over for the different tables found in the source database.

I've written a small utility that can help in this task. The code connects to the database, collects table information like the columns and column data types, and writes the script.

Below is a list of the current scripts that it creates. I've provided the code for you as well so that you can simply copy and paste into a new console app. You can also download the Visual Studio 2k5 Solution.

Continue reading ‘TableScriptGen – C# 2 Console App’ »

NOTE: This is a first draft, alpha code release.

This application was written to run multiple sql scripts files against an MS Sql server database. I wrote it to learn more about .NET C# 2 Windows application development.

It is pretty much a work in progress, but it’s at a usable point so I decided to release it.

Please download the source below. If you learn from it or find it useful in any way, please leave me a comment. Also, if you enhance it, I’d like a copy.

Screenshots:

Click here to download the C# 2 Source (Visual Studio 2k5) (1.2Mb)

This is a very simple label printer application I wrote for work. I don’t have the code for download, because it’s a very specific application, and probably won’t work for you, but it does showcase some of the powerfull features of Foxpro.

Here is how it works:

The user enters a search term, then clicks the search button. The program connects to the Sql Server 2000 database, retrieves the data, and populates the data grid. The user then selects the record desired and the label preview is generated. On every record selection the preview is automatically generated. The user can then select a modifier by clicking on one of the radio buttons to the right of the preview container. On each change of the modifier the preview is automatically updated. The user then clicks the print button and the label is sent to the label printer and the cursor is automatically placed in the search box.

Prior to printing, the user can can select the desired printer and paper size using the Print Setup button. Being able to select or change printer settings is very important, because some of the users use this application through a terminal server session. The label printer is attached to their local workstation and gets mapped from the terminal server back to their PC when they log on. Since the name of the printer is not known until after the user logs on, it would be difficult to hardcode the printer in the report file. By being able to make printer changes at runtime, it makes it easy for the user to chooses his or her printer after they log on. They only do this the first time, as once the settings are changed, they are saved in the lbx file until the next time they need to be updated.

For more information on the reporting capabilities of VFP 9, please check out this great article:

Techniques for an alternative Report Preview UI

Also, take a look at the SYS(1037) function in the FoxPro help file.

Here are some screenshots of the program. (click to enlarge)

I’ve had this app for a while. In fact, this was one of the very first apps I built in Foxpro. I haven’t posted it because I wanted to get it cleaned up and add in some of the new things I’ve learned.

It’s basically a file sorting utility that takes files from a specified source directory and its subdirectories, and places them in the destination’s subdirectories based on the file’s extension.

It was originally designed to be used with “Unreal Tournament”. At lanparties it is quicker and easier to start a new match if everyone already has the files locally on their computers instead of having to download them from the game server when entering a new game. This utility makes it easy for everyone to get all the new maps/addons from a “lanparty” directory prior to starting the game.

The program can also be used for other occasions where files need to be organized in directories based on their extension. To know more download the program and give it a try. It has the ability to create a test directory, so you can change the mappings to search for any file type and then place it in one of the test directory’s subdirectory.

Click here to download the Windows 98 and up installer (5.2Mb)
Latest version 1.2.137

Another little program released. This program is for retrieving the HTML of a web page.

After experimenting with the West Wind Internet and Client Tools and then with my own version of a wininet.dll wrapper, I decided the easiest way was to use the WinHTTP service. I didn’t even know it existed until I found it on Calvin Hsia’s Weblog.

Below is the main code of the application. Look at the links provided in the readme for more information on the oHTTP object instantiated in the code.

Thisform.MousePointer = 11
Try
        Local oHTTP As "winhttp.winhttprequest.5.1"
        oHTTP=Newobject("winhttp.winhttprequest.5.1")
        oHTTP.Open("GET",Trim(Thisform.txtUrl.Value),.F.)
        oHTTP.Option(4) = 13056 && Ignore ssl errors
        && Lets look like IE
        oHTTP.SetRequestHeader("user-agent", ;
                "Mozilla/4.0 (compatible; MSIE 6.0; Windows ;
                NT 5.2; .NET CLR 1.0.3705;)")

        oHTTP.Send()

        Thisform.txtHtml.Value = oHTTP.ResponseText
        Thisform.txtHeaders.Value = oHTTP.GetAllResponseHeaders
Catch To ex
        Thisform.txtHtml.Value = ex.Message
Finally
        Thisform.MousePointer = 0
Endtry

Click here to download the Windows 2000sp3 and up installer (5.2Mb)
Latest version 1.0.47

Ok…so here it is…the first of hopefully many applications you can download.

The idea to create this app came to me while I was trying to troubleshoot my uncle’s program that wouldn’t connect to his smtp server. His application is in VB6 and he uses it to send out emails from a list of addresses in an Access database. After he switched isps he could no longer get it to work since the new isp requires him to authenticate before being able to send mail. I didn’t know all the inner workings of communicating with an smtp server, but I was able to figure out that we needed to send the auth command and then in some way the username and password. Not having enough time to fix it I went home later that evening and started researching. To make it more interesting I decided to create a little tool that I could use to learn with as well as use later.

I decided to use Foxpro to develop the program for two main reasons. First, I’ve only been using it for about a year, so I needed the practice. Second, I wanted to develop an application that you wouldn’t normally see written in Foxpro. Most Foxpro apps, at least from what I can tell so far, are data driven applications. Many smaller companies out there tend to use Foxpro because it is relatively inexpensive, yet extremely flexible and super fast, especially when it comes to dealing with data. I also hope that by developing these little tools, I can help make people more aware that Foxpro is out there and can be used for a variety of projects.

Click here to download the Windows 98 – XP installer (5.2Mb)
Latest version 1.2.301