Misc Functions (V2) - Freeware
Source code 32 bit functions from Frank Uhlik:
Compatible with all Clarion versions - CW2 to Clarion 5.5
SLASHED(TestString,Flag)
TestString = a String - a Variable - that has the path you want to test.
Slashed returns the string with or without a backslash - regardless of how it was to begin with.
Flag = a 0 or a 1 - 0 means remove any backslash, 1 means ensure there is a backslash.
___________________________________________________________________________
COPYFILE('SourceFile','TargetFile','NoOverwriteFlag')
SourceFile = a String - Constant (ie 'Inside Quotes') or a Variable - that has the name and optionally the path of the file to be copied - No special formatting required.
TargetFile = a String - Constant (ie 'Inside Quotes') or a Variable - that has the name and optionally the path of the new file - No special formatting required.
NoOverwriteFlag = a True (value of 1) or False (value of 0). If you enter FALSE (or 0), the function will OVERWRITE any existing file with the same name as the Target. If you enter TRUE (or 1), Existing Files are left alone.
___________________________________________________________________________
KILL('FileName')
Improved
- Now deletes multiple files with wildcards
FileName = a String - Constant (ie 'Inside Quotes') or a Variable - that
has the name and optionally the path of the file to be deleted.
Kill will accept wildcards (*.* etc.) and will delete multiple
files.
In Multiple Delete mode, KILL accesses all files including Hidden, System
and Read-only files.
___________________________________________________________________________
MAKEDIR('NewFolderName')
NewFolderName = a String - Constant (ie 'Inside Quotes') or a Variable - that has the name and optionally the path of the new folder to be created.
___________________________________________________________________________
REMOVEDIR('EmptyFolderName')
EmptyFolderName = a String - Constant (ie 'Inside Quotes') or a Variable - that has the name and optionally the path of the folder to be deleted.
If the Folder is not empty, the function will fail.
___________________________________________________________________________
PLAY('WaveFileName')
WaveFileName = a String - Constant (ie 'Inside Quotes') or a Variable - that has the name and optionally the path of a WAVE file you want to play. The procedure is designed for use with Wave Files only but still expects the '.wav' file extension in the name of the file.
___________________________________________________________________________
GetScreenRes()
Example: MyString = GetScreenRes()
Returns the screen resolution in a string (eg. 640 x 480, or 800 x 600 etc)turns a value of '1' if it was successful or a Value of '0' if it failed.
___________________________________________________________________________
EXIST('FileName')
FileName = a String - Constant (ie 'Inside Quotes') or a Variable - that
has the name and optionally the path of the file or folder to be
checked.
This function will accept a 'filename' alone, as in example 1, a
'path\filename' combination, or a 'pathname'.
Exist works with any valid file or folder name on a local PC or on
a Network.
___________________________________________________________________________
TOGGLE('KeyToUse',ActionFlag)
GETS or SETS Toggle attributes for NUM Lock, CAPS Lock and SCROLL Lock.
___________________________________________________________________________
DecToHex(DecimalValue,
MessageFlag)
Converts a Decimal value to a HEX
String.
___________________________________________________________________________
HexToDec(HexString,
MessageFlag)
Converts a HEX value to Decimal.
___________________________________________________________________________
FolderPath (FileName)
Returns the fully qualified long PATH of
a Filename
Installation: Unzip MISCFUNC2.ZIP into its own directory and then
look at Clarion 32bit Functions.DOC
Download
MISCFUNC21.ZIP
(9K)
|