Jump to content
Sign in to follow this  
Meerecat

Windows 7 Touch Screen Input

Recommended Posts

Meerecat

Hello

I have a Dell Inspiron Duo. It is a nice little netbook but I find the touch screen irritating at times. I can disable it by going to Control Panel>Pen and Touch>Touch and unchecking 'Use your finger as an input device'. I would like to create a hotkey to toggle this checkbox on and off without having to open the dialogue. Can anybody point me in the right direction of where to start?

Many Thanks

Lee


Lack of planning on your part does not constitute an emergency on my part.-The biggest idiot can ask questions the smartest man cannot answer.

Share this post


Link to post
Share on other sites
BrewManNH

There's a registry setting for that in the HKCU key, look for the "Software\Microsoft\Wisp\Touch" setting and monitor it as you turn it on and off by the GUI and see how the setting changes as you disable/enable it. Then write a regwrite to do the same thing from your script.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
JohnOne

Found some C++ code, but dont know about the Atom business and have no Idea if it can be converted to / Accessed by Autoit3

#include <tpcshrd.h>  

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)  {   
    const DWORD_PTR dwHwndTabletProperty =  
        TABLET_DISABLE_PRESSANDHOLD | // disables press and hold (right-click) gesture  
        TABLET_DISABLE_PENTAPFEEDBACK | // disables UI feedback on pen up (waves)  
        TABLET_DISABLE_PENBARRELFEEDBACK | // disables UI feedback on pen button down  
        TABLET_DISABLE_FLICKS; // disables pen flicks (back, forward, drag down, drag up)   
    ATOM atom = GlobalAddAtom(MICROSOFT_TABLETPENSERVICE_PROPERTY);   
    SetProp(hWnd, MICROSOFT_TABLETPENSERVICE_PROPERTY, reinterpret_cast (dwHwndTabletProperty));  
    GlobalDeleteAtom(atom); 
}
Think these are constants

$TABLET_DISABLE_PRESSANDHOLD        = 0x00000001
$TABLET_DISABLE_PENTAPFEEDBACK      = 0x00000008
$TABLET_DISABLE_PENBARRELFEEDBACK   = 0x00000010
$TABLET_DISABLE_TOUCHUIFORCEON      = 0x00000100
$TABLET_DISABLE_TOUCHUIFORCEOFF     = 0x00000200
$TABLET_DISABLE_TOUCHSWITCH         = 0x00008000
$TABLET_DISABLE_FLICKS              = 0x00010000
$TABLET_ENABLE_FLICKSONCONTEXT      = 0x00020000
$TABLET_ENABLE_FLICKLEARNINGMODE    = 0x00040000
$TABLET_DISABLE_SMOOTHSCROLLING     = 0x00080000
$TABLET_DISABLE_FLICKFALLBACKKEYS   = 0x00100000
$TABLET_ENABLE_MULTITOUCHDATA       = 0x01000000

EDIT:

Source = stackoverflow.com

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
Meerecat

It is listed as a USB Input Device in Device Manager. However the regwrite seems the easiest way, at least to my limited knowledge.

Thanks guys


Lack of planning on your part does not constitute an emergency on my part.-The biggest idiot can ask questions the smartest man cannot answer.

Share this post


Link to post
Share on other sites
Meerecat

I have found the DWORD that this setting updates in the registry. If I use the registry to change the value it doesn't work until after a reboot, however using the control panel option works immediately. Is there any way around this?

(I realise this is no longer an AutoIT issue, but hoping someone may have an idea).

Many Thanks


Lack of planning on your part does not constitute an emergency on my part.-The biggest idiot can ask questions the smartest man cannot answer.

Share this post


Link to post
Share on other sites
JohnOne

Well it is an autoit issue, if you are trying to do it with autoit.

There are a lot of control panel settings you can accomplish via objects and WMI, I'm not familiar with them but I know they are there.

Scriptomatit springs to mind, but unfortunately I'm quite the dunce regarding that also.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
Meerecat

AutoIT writes the registry key correctly. It just doesn't work until after a reboot. Editing the registry key via the registry directly also doesn't work until after a reboot. However using the option within the control panel (which updates the same registry key), works without a reboot.

Confused lol


Lack of planning on your part does not constitute an emergency on my part.-The biggest idiot can ask questions the smartest man cannot answer.

Share this post


Link to post
Share on other sites
Meerecat

Hi John, thanks for your help. I accomplished this by updating the registry key then ending and restarting explorer.exe which seems to update the system.

Thanks again

Lee


Lack of planning on your part does not constitute an emergency on my part.-The biggest idiot can ask questions the smartest man cannot answer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×