My old mouse driver had a nice feature, which allowed you to switch
programs by holding a side button and scrolling with the wheel. I'm
trying to recreate this with PowerPro, and so far I managed to get it
to work with the help of MouseTrap and KeyTrap plug-ins. Now, the only
thing left is, that I don't want the window under cursor to receive
scroll events (I also have MouseWheel support like KatMouse enabled in
mousetrap.ini, as that another feature that I'm used to from my old
driver).

I would also like that just clicking the side mouse button sends the
active application to background, but I'm unsure what would be the
best way to achieve this. I experimented with win.back(win.topwindow),
but this doesn't work - win.topwindow seems to almost always return
some (invisible) IME-related window handle.

Any help would be appreciated. Here's what I have so far:

mousetrap.ini:

[Active]
ini=0,0,0,ANY,MWU,,,Edit:scroll=#,0,1,0,0,0,,           --> must set EAT and 
NOMOD to 1
ini=0,0,0,ANY,MWD,,,Edit:scroll=#,0,1,0,0,0,,           --> must set EAT and 
NOMOD to 1
; ---------------------------------------------------------------------------

;start/stop application switching
ini=0,0,0,ANY,4MD,,,[EMAIL PROTECTED],1,1,1,1,0,
ini=0,0,0,ANY,4MU,,,[EMAIL PROTECTED],1,1,1,1,0,

ini=5,0,0,ANY,MWU,,,[EMAIL PROTECTED](1),1,1,1,0,0,
ini=5,0,0,ANY,MWD,,,[EMAIL PROTECTED](0),1,1,1,0,0,


MouseSwitch.powerpro:

Global inSwitch

Function StartSwitch
        if (inSwitch != 1) Do
                inSwitch = 1
                Win.Debug("Start")
        EndIf

Function Switch(direction)
        if (inSwitch == 1) Do          ;;started application switching
                Win.Debug("Alt+Tab start")
                KeyTrap.sendkeys(56,18,0)  ;;Alt press
                inSwitch = 2
        EndIf
        If (inSwitch == 2) Do
                if (direction == 1) Do
                        KeyTrap.sendkeys(42,160,0) ;;Shift press
                        Win.Debug("Shift")
                EndIf
                KeyTrap.sendkeys(15,9,0)   ;;Tab
                KeyTrap.sendkeys(15,9,1)
                Win.Debug("Tab")
                if (direction == 1) Do
                        KeyTrap.sendkeys(42,160,1) ;;Shift up
                EndIf
        EndIf

Function StopSwitch
        if (inSwitch == 2) Do
                Win.Debug("End")
                KeyTrap.SendKeys(56,18,1)  ;;release Alt
        Else
                
Win.Debug("SendToBack",win.topwindow,win.caption(win.parent(win.topwindow),1))
                win.back(win.topwindow)
                Win.Debug("New 
top:",win.topwindow,win.caption(win.parent(win.topwindow),1))
        EndIf
        inSwitch = 0


-- 
< Jernej Simončič ><><><><>< http://deepthought.ena.si/ >

The bigger the man, the less likely he is to object to caricature.
       -- Le Pelley's Law



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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