Re: Controling the speed of the mouse - this code does not work.

new topic     » goto parent     » topic index » view thread      » older message » newer message
doncole2009 said...
 
procedure Screen_keydown(integer Self, integer Event, sequence Params)  
-- Application hot key detector  
if Params[1] = VK_F12 then  
        if and_bits( Params[2], ControlMask ) then -- control F12 to toggle mouse speed  
            printf(1,"entry question speed_toggle=%d\n",{speed_toggle}) 
                if speed_toggle then  
                        poke(gwsMem, int_to_bytes(10))  
                else  
                        poke(gwsMem, int_to_bytes(1))  
                end if  
        VOID = w32Func(xSystemParametersInfo,{SPI_SETMOUSESPEED,0,gwsMem,0})  
            speed_toggle = not speed_toggle  
    --  VOID = w32Func(xSystemParametersInfo,{SPI_GETMOUSESPEED,0,gwsMem,0})  
                VOID = message_box(sprintf("Mouse Speed is now %d",peek4u(gwsMem)),"Test", #0)  
            orig_mouse_speed = peek4u(gwsMem)  
        end if  
end if  
end procedure  
setHandler(Screen, w32HKeyDown, routine_id("Screen_keydown"))  
 

changes the message_box and the orig_mouse_speed.

Don Cole

I do not get what you are telling me. If you comment out the getmousespeed, how will I know what the mouse speed is? That is not part of the functionality. It was placed there so I could confirm that I was not seeing any change in the mouse speed.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu