Hi Sean and Everyone,
for those who have XP and get annoyed if not in haste shut off compacting
and loose emails folder data by stopping the compact mode.
Below is the way to get it and also set it to 0. You could also set it to any
value if you wanted to, it does the pop-up at 100 so anything over 100 will
trigger the Yes/No pop-up every time you exit Outlook Express.
The below routine could be changed to a function if you wanted to fetch the
value, I just pop-up the value there.
I am reading the registry settings and fetching key values to find or set
the check count.
Sub Read_CompactCount()
'Read The Outlook Express Compact Check Count.
Dim oShell
Dim strPath, iValue
Set oShell = CreateObject("WScript.Shell")
strPath = "HKCU\Identities\" _
& GetIdentityKey _
& "\Software\Microsoft\Outlook Express\5.0\" _
& "Compact Check Count"
iValue = oShell.RegRead( strPath)
msgBox "The Email Compact Count Is: " & iValue
End Sub
Sub Reset_CompactCount()
'Reset The Outlook Express Compact Count To 0.
Dim oShell
Dim strPath, iValue
Set oShell = CreateObject("WScript.Shell")
strPath = "HKCU\Identities\" _
& GetIdentityKey _
& "\Software\Microsoft\Outlook Express\5.0\" _
& "Compact Check Count"
'Set Compact Count To 0:
oShell.RegWrite strPath, 0, "REG_DWORD"
iValue = oShell.RegRead( strPath)
msgBox "The Email Compact Count Is Now: " & iValue
End Sub
Function GetIdentityKey()
'Find The Identity Key.
Dim oShell, oReg, strComputer, strKeyPath, strSubkey, arrSubkeys
'The following trees (Hives) are defined in Winreg.h: Decimal Or (Hex)
const HKEY_CLASSES_ROOT = 2147483648 '(0x80000000)
const HKU = 2147483651 '(0x80000003) 'Users.
const HKCC = 2147483653 '(0x80000005) 'Current Config.
const HKDD = 2147483654 '(0x80000006) 'For Win95 and ME.
const HKLM = 2147483650 '(0x80000002) 'Local Machine.
const HKCU = 2147483649 '(0x80000001) 'Current User.
strComputer = "."
strKeyPath = "Identities"
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\default:StdRegProv")
oReg.EnumKey HKCU, strKeyPath, arrSubkeys
If IsArray(arrSubkeys) Then
For Each strSubkey In arrSubkeys
GetIdentityKey = strSubkey
Exit Function
Next
End If
End Function
Setting the Windoweyes object:
Set WeTts = createObject( "windoweyes.application")
vo = WeTts.ActiveSettings.Screen.Tone
rl = WeTts.ActiveSettings.Screen.Rate
pl = WeTts.ActiveSettings.Screen.Pitch
vl = WeTts.ActiveSettings.Screen.Volume
weVersion = WeTts.Version
WeTts.Speech.Speak (" The version of we is: %s" % weVersion)
Of course you can use any object model format in the object model section
related to the application.
Other stuff you must create the shell or scripting object if outside of the
screen reader platform.
Bruce
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com