AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to control an object WindowSpy can't see? (MicroTouch)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Robert Carnegie



Joined: 01 Jun 2005
Posts: 53
Location: Scotland

PostPosted: Mon Oct 30, 2006 1:28 pm    Post subject: How to control an object WindowSpy can't see? (MicroTouch) Reply with quote

MicroTouch software for a touchscreen monitor places a right-button icon in a square tile at bottom right of the screen. When this button is pressed, the next touch on the screen is interpreted as a right (secondary) mouse button instead of a left (primary) mouse button.

I would like to move this button or alternatively to put it on top of Windows interface elements that paint over it. On its own, it floats over most applications, but the taskbar covers it.

(Alternatively, I could use someone else's program that does the same job - I think there are freebies available - but I would prefer to fix this one.)

This is on Windows XP Professional.

The catch is the program doesn't seem to have a window name. WindowSpy doesn't seem to detect that I am pointing at this thing instead of the desktop or another application. It doesn't appear in Applications on Windows Task Manager, but apparently it does appear as a process TwMonitor.exe. The file for TwMonitor.exe has description "Touch Monitor".

How can I pursue this?

Another approach that could be scripted is to terminate TwMonitor.exe when it is not visible, by reading the graphic image at the screen location, and then to re-start it. That puts it back. But that's a clumsy way to make it reappear, and it doesn't allow me to move it on screen - I think.

I suppose that messages from AutoHotkey addressed to "Touch" may be received but ignored, and that's why the control isn't doing what I want it to do. But on the other hand, in a different exercise, when I tried a script that simply tells every object that comes to foreground to maximise, windows that clearly weren't designed to be maximised, were so; application message boxes, file selectors. A few, not. It was amusing and inconvenient at the same time. So I'd guess against this program having the default attribute of ignoring "Winset, Top", etc. Still, I could be wrong.
Back to top
View user's profile Send private message Send e-mail
JSLover



Joined: 20 Dec 2004
Posts: 542
Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...

PostPosted: Mon Oct 30, 2006 8:19 pm    Post subject: Re: How to control an object WindowSpy can't see? (MicroTouc Reply with quote

Code:
F12::
touchpn=TwMonitor.exe
touchdebug=1
Process, Exist, %touchpn%
touchpid:=errorlevel
IfWinExist, ahk_pid %touchpid%
{
   if touchdebug
   {
      WinGet, touchhwnd, id
      WinGetTitle, touchtitle
      WinGetClass, touchclass
      msgbox, 64, ,
      (LTrim
         Found that sucker...

         process(%touchpn% %touchpid%)
         hwnd(%touchhwnd%)
         title(%touchtitle%)
         class(%touchclass%)
      )
   }
   ;//WinSet, Bottom
   WinSet, Top
   ;//WinSet, AlwaysOnTop, Toggle
   ;//Sleep, 1000
   ;//WinSet, AlwaysOnTop, Toggle
}
else msgbox, 16, , %touchpn% window doesn't exist!
return

_________________

Home • Click image! • Blog
Back to top
View user's profile Send private message Visit poster's website
Robert Carnegie



Joined: 01 Jun 2005
Posts: 53
Location: Scotland

PostPosted: Wed Nov 01, 2006 1:00 am    Post subject: Reply with quote

That got it! Thanks!

The button seems to respond to WinMove but to little else, so I cut the script down to this to move it near to top right of the non-taskbar area - I've forgotten how to do quotes so,

; obtain Desktop1Left Desktop1Top Desktop1Right Desktop1Bottom
;
SysGet, Desktop1, MonitorWorkArea, 1
NewX:=Desktop1Right+-85
NewY:=Desktop1Top+34

touchpn=TwMonitor.exe
touchdebug=1
Process, Exist, %touchpn%
touchpid:=errorlevel
IfWinExist, ahk_pid %touchpid%
{
WinMove, %NewX%, %NewY%
}
else msgbox, 16, , %touchpn% window doesn't exist!
return

...after which I modified it again to launch TwMonitor.exe as well and replace its startup shortcut. But I think I still had to catch it in your fishing-net.

Thanks again!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group