If you don't know it, have a look at http://www.photools.com/
These Scripts can be used any way, but also without any kind of warranty!
If you don't agree, please leave now.
= new Script
= updated Script
Multi Database Transmission V 1.2 (06-Jun-2003) - This script transmits Images from a SourceDB to a TargetDB, preserving all Category-Assignments and Property-Entries. (And, *g*, if Mario would give us an updated Timestamp for the DatabaseImageRecords, we could merge Databases by checking which Entry is newer. Think about mobile IMatch.)
Remove Empty Categories from Database V 1.0 (30-May-2003) - This script removes all 'empty'-Categories from the active Database.
OffLineCache Garbage Collector V 1.0 (28-Jun-2003) - This script checks all existing Images in OfflineCacheFolder of the active Database and deletes ownerless OLC-Images. Additionally you can select some Categories from which you want delete the Images OfflineCache-pendants.
Photoshop Conversion (PS 5.5 + 6) V 0.9 (02-Jul-2003) - This Script combines the ManagementPower of IMatch with the ImageManipulationPower of Adobes Photoshop 6.0 in an easy to use way. This Script I have written together with Klaus Schwarzburg. Many thanks for your help, Klaus.
lcms Webgallery Creator V 0.1 (05-Oct-2002) - This script enhance the original Webgallery-Creator-Script with an ICC-Conversion-feature.
little Batch Converter V 1.2 (26-Jun-2003) - This script create resized copies, optionally with ICC-Conversion for Tiff- and Jpeg-sources. Can work with OfflineCacheImages instead of originals and can transmit all Property-, Category- and IPTC-data to the copies.
Registry Functions V 1.0 (01-Nov-2002) - A littleHelper-Script to put and retrieve Data to/from Registry in its correct DataTypes. VB usually provides only the StringType. With this Lib you can store every DataType to Registry (Byte, Integer, Long, Double, Decimal, Boolean, Variant, ...).
Debug Messages V 1.0 (08-Nov-2002) - A littleHelper-Script which handles Debugoutput in Priorityclasses. With this you can have good Informationoutput when you develope a Script and a less or no Output when run the Script in Productivity-Mode. Your DebugmessagePoints can stay in code without any (auswirkung). Usefull for future changes on your code.
Explanation
MainScript: hnSample_FncDebugMsg.bas
Needed Modules: [hnFncDebugMsg.obm]
1) Unzip the package and copy the files to your
IMatch Scriptfolder.
In the Scriptfolder itself you find a little SampleScript "hnSample_FncDebugMsg.bas"
In a Subfolder named hn273 must reside the Libfile:
- hnFncDebugMsg.obm
2) In every of your Scripts you want to use DebugMessages,
you have to embedd the libfile with a Uses-Statement: e.g.: '#uses "hn273\hnFncDebugMsg.obm".
Also you must set the value of three Public Variables in the 'Sub Main'-Section
of your embedding Script.
3) After that you can call the Public Function DoDbgMsg() from everywhere in your Script.
The Script provides different Outputs (normally) to the DebugWindow.
You can keep your Messages with the code, even if developing has finished (maybe
for future changes on your code?), or if you want run the Script without debugging.
You only have to change one Variable from True to False to stop or start all Messaging.
Placing an Message somewhere in your code
It is very easy because I have defined some Enumerations to make it as comfortable as it can be. So you can type a FunctionCall like this:
DoDbgMsg(
Then a little Dropdownlist will appear with the values for the first FunctionParameter:
(TIP: if it does not appear you have to 'open uses'. This
is in EditorMenu -> Sheets -> open Uses!)
This is the Priority of the Information you want to place here. Low, medium and high I use for different Debugprocesses. The Production-Priority comes after high. This can be used for normal Scriptoutput, not for Debugging.
As the next Parameter you can type in the FunctionName where you place the Message, "SampleScript".
Pos means a Position in that Function. This will dropdown a list:
At last the Information you want to get from the Script (as String):
"My most important Variable now has Value: " & mostImportantVar)
Thats all.
In head of the Sub Main you must define the Values of three Public Variables:
dbgmsg = True
PromptMe = False
DbgOutPutPriority = low
With dbgmsg = True you enables the DebugMessages, False = disabled.
With PromptMe = True all (I say ALL) Output comes up as Msgboxes and goes not to the DebugWindow.
With DbgOutPutPriority you define which messages will be shown.
Now the Script works that way that all Messages with the same and higher Priority
will be shown. If you select medium medium + high + Production will be shown, only
low-messages will be not.
If this concept doesn't suites your needs you can easily change the DoDbgMsg-Function that only the Messages which have the selected class will be shown. This is instead of Priority a simple selection but maybe more usefull for your needs.
If you want to change the concept to SimpleSelection please change the following
codeline in DoDbgMsg():
If dbgmsg And Priority >= DbgOutPutPriority Then
to this:
If dbgmsg And Priority = DbgOutPutPriority Then
And if you want to add more selectiongroups you can add them to the Enumeration:
Public Enum OutPutPriority
low
medium
high
Production
End Enum
Can be:
Public Enum OutPutPriority
RegistryPart
ConvertPart
MainPart
AnotherName
P2
P3
P4
WhateverYouWant
End Enum
Remember, this will appear in the little DropdownList ( =:) I love them).
This makes coding a little bit more comfortable.