|
|
|
Does it ever bother you that when you're looking for say, examples of VBScripts or files to download, you get stuff that is close, but not exactly what you want. I can't say that this stuff is exactly what you want but it's what I was looking for and had to create on my own. Maybe it will work for you. Here's some stuff I wrote and files I need to get my work done. I know it's a big web out there, but I've never been able to find anything like this, anywhere. VBScripts - this covers Visual Basic code, Visual Basic Scripting and Visual Basic for Applications. Files and Utilities - this covers all manner of utilities that I've found make my work easier. Click the header to return to the top. All the files are available for downloading. If the file is for shareware or a web purchase, you will be redirected to the proper home page. I'm not a big fan of shareware. I understand that programmers want to be reimbursed for their work but that doesn't mean I have to like it. To me, they're like commercials; I know they're necessary but I still hate them. As far as I am concerned, no piece of shareware should cost more than ten dollars. If you want people to use it, keep it inexpensive. Leave the outlandishly expensive and overpriced to the pros; like Apple.
First of all, get yourself a good VBScript editor. I recommend VbsEdit© from
Adersoft.
As of this writing, the current version is 3.3.9.5 and is very good. One of the great features is Snippets. You
create you own code modules and then save them as Snippets. When you need to write a new script, you add all of the code you
need from your Snippets and the script practically writes itself! Trust me, I'd be dead without it. The link below is
my snippet file in ZIP format.
My Snippets File Install VbsEdit© first and then put the snippet file in the following location: C:\Documents and Settings\LogonName\Application Data\Adersoft\VbsEdit The features of VbsEdit© are too numerous to list but it does include the entire listing for WMI and a built-in debugger. All you have to do is to install the Microsoft Script Debugger. You don't have to search for it either; it's a choice from the Help menu! Also, if you install the help file for Windows Script Technologies, pressing F1 will provide keyword help. This utility is very easy to setup and use. The debugger only works with the paid version. The cost is only $49.00 US and is well worth it. The Adersoft home page has sample scripts and code snippets, too. If you're into Java (I'm not and refuse to be), they have a Java Script editor available as well. Get VbsEdit© and make your scripting life much easier! A few words about my VBScripts. I use "Hungarian Notation" when I create variables. This makes it so much easier to read the script as well as change it later. So all variables will begin with either an "L" or a "G"; for local or global. The variable will then be followed by the traditional 3-character designation. I know that all variables in VBScripts are variants, but it's best practice to use the correct designation at all times.
bln = boolean (true or false) byt = byte col = collection dbl = double dtm = date (time) err = error int = integer lng = long integer obj = object sng = single str = string var = variant Examples: Variable name Read as lintErrNum local integer ErrNum gstrMsgText global string MsgText lblnIsReady local boolean IsReady gobjFSO global object FSO Put Album Art - a VB Script I wrote to copy the album art from my computer to my SanDisk Sansa e260 MP3 player. It should work with any Sansa e200 series MP3 player. Remember to rename it and replace the TXT extension with VBS. Also, edit the file and read the comments at the top. You may have to make changes. Basically (assuming all defaults), the script will search the Sansa device and for every folder on the device, it will copy the file called folder.jpg from the music folder on the PC to the Sansa device and name it album art.jpg. Excel Workbook - a template I use for all of my workbooks. Just has some basic macros to get the automation going. Timer VBScript - ever wonder how to time a long running process in VBScript? Here's how! My Network Places - want to create shortcuts in the My Network Places folders? Use this script.
I'd like to say a few words about this script. I found a script on the web that purported to do this very thing but
it never did. The author, though while quite capable, was trying to write the target.lnk file in hex! It
didn't make much sense to me so I took the part of his code that creates the folder and the desktop.ini file and
melded it with the code I was using to create shortcut files. Eureka! Instant My Network Places shortcut! Not
only does it work with UNC paths (\\server\share), it also works with URL's (http://www.website.com)! Not bad for
1/3 the code!
All utilities are contained in this Zip file.
GetKey - a pretty useful utility when you create menus in batch files. GetKey returns the code of the key pressed. SetX - this is from Microsoft but I have it here, too. Very useful in batch files. GetGroup - this is batch file I wrote that will return the members of any domain group you enter. It requires SetX. CMDHere - an installable INF file that will create a menu to go to a command prompt when you right click any folder. |