> Instead of entirely disabling it, how about having it
> simply reflect the setting available in Tweak UI, and
> modifying whatever registry entries that Tweak UI
> modifies?

I once tried to figure out exactly what was being done by TweakUI X-Mouse
option by comparing before and after Inctrl5 logs in order to create a pair
of reg files that would turn it on and off - most of the time I have it on
but for certain apps it gets in the way.

I never could get it to work :-( - I think because it requires masking
certain bits on and off in Hex number.

FWIW: this is the code/pseudo-code that X-setup/X-Teq shows for the X-Mouse
options. Maybe its clear enough that someone can work up the required
Power-Pro equiv?

>>
'0x01 = Actvate Window on mouse
c_ValMouseAct=&H01
'0x40 = Bring Window to front
c_ValMouseFront=&H40


Sub Plugin_Initialize
 if RegValueExists(UPM_GetUPMRegPath) then
    if UPM_IsValueActivated(c_ValMouseAct)=true then
       Call SetUIElement(1,true)
    end if

    if UPM_IsValueActivated(c_ValMouseFront)=true then
       Call SetUIElement(2,true)
    end if

 else
    Call Disable
 end if

End Sub

Sub Plugin_CheckData(ElementIndex)
End Sub

Sub Plugin_Apply(ElementIndex,ElementSubIndex)
 bVal1=GetUIElement(1)
 bVal2=GetUIElement(2)

 if bVal2=true and bVal1=false then
    bVal1=true 'second option only with first option together!
 end if


 Call UPM_SwitchValue(c_ValMouseAct,bVal1)
 Call UPM_SwitchValue(c_ValMouseFront,bVal2)

 Call SetUIElement(1,bVal1)
 Call SetUIElement(2,bVal2)


 Call Logoff()
End Sub

Sub Plugin_Terminate
End Sub


'----------------------------------------------------
'*** UPM (UserPrefenceMask) Functions Version 1.0 ***
'----------------------------------------------------

Function UPM_GetUPMRegPath
 if GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then '95/98/ME
    UPM_GetUPMRegPath="HKCU\Control Panel\Desktop\UserPreferenceMask"
 else 'NT/2K/XP (?)
    UPM_GetUPMRegPath="HKCU\Control Panel\Desktop\UserPreferencesMask"
 end if
End Function

Function UPM_IsValueActivated(ValueInHEX)
 UPM_s=RegReadValue(UPM_GetUPMRegPath)
 UPM_s=CStr(UPM_s)
 UPM_s=left(UPM_s,2) 'extract first byte
 UPM_sV="&H" & UPM_s 'convert to HEX

 if UPM_sV and ValueInHEX then
    UPM_IsValueActivated=true
 else
    UPM_IsValueActivated=false
 end if
End Function

Sub UPM_SwitchValue(ValueInHEX,BoolActivated)
 b=UPM_IsValueActivated(ValueInHEX)
 if b=true and BoolActivated=true then
    'do nothing, value already activated
 else
    if b=false and BoolActivated=false then
       'do nothing, value already deactivated
    else
       UPM_sAll=RegReadValue(UPM_GetUPMRegPath)
       UPM_sAll=CStr(UPM_sAll)

       UPM_s=left(UPM_sAll,2) 'extract first byte
       UPM_sV="&H" & UPM_s

       if BoolActivated=true then
          UPM_sV=UPM_sV+ValueInHEX
       else
          UPM_sV=UPM_sV-ValueInHEX
       end if

       UPM_s=Hex(UPM_sV) & right(UPM_sAll,len(UPM_sAll)-2)
       Call RegWriteValue(UPM_GetUPMRegPath,UPM_s,3)
    end if
 end if
End Sub

<<


Regards ... Alec
-- 


---- Original Message ----
From: "Alex Peters" <[EMAIL PROTECTED]>
To: "brucexs on Yahoo! PowerPro Group"
<[email protected]> Sent: Tuesday, January 04, 2005
21:19 Subject: [gla: [power-pro] Re: Operations question

> -- Bruce wrote:
>
>> I should disable this feature, at least for Windows
>> 2000+, I think, since it is available with Windows. Get
>> TweakUI from MS site to access it easily.




Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to