AutoHotkey Community

It is currently May 26th, 2012, 3:01 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: January 6th, 2009, 3:52 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
Hi All,

I've got something you guys can probably help me with. I have a tablet PC, and want to use the 4th and 5th button of my mouse to show and hide the Tablet Input Panel (TIP). The showing is easy, but hiding doesn't seem to work. I've been juggling with it for some time now, but can't seem to find the solution.

Xbutton2::
Run TabTip.exe
return

(this works, and shows the window).

However the hiding seems to be more of a problem. The TIP window doesn't have a name, so I cannot use that. I used window spy and this ( http://www.autohotkey.com/forum/viewtopic.php?t=8366 ) thread to find the class name for tap tip, which is IPTip_Main_Window. But still, I can't figure it out.

There is a button on the taskbar which identifies as TIPBand, and pressing that toggles show/hide of the main Input window. I think it refers to tipband.dll. I don't know much about programming, but hopefully someone can figure it out!

Thanks,

Billy


Last edited by Bllly on February 10th, 2009, 9:30 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2009, 7:51 am 
as stated in help file:
Quote:
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]

u can output the PID, so winhide, winclose can work with the ahk_pid %OutputVarPID%


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2009, 8:33 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
Thanks for your reply.

I didn't quite get it yet.
The program's unique Process ID (PID) is blank, so that cannot be used.
Any other ideas?

Billy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2009, 3:53 am 
Code:
;DetectHiddenWindows, On

XButton2::
IfWinNotExist, ahk_class IPTip_Main_Window
   Run, TabTip.exe
Else
   WinShow, ahk_class IPTip_Main_Window
Return

XButton3::
   WinHide, ahk_class IPTip_Main_Window
Return


:?:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 8th, 2009, 9:28 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
That also doesn't work . I tried with process, close ... but to no luck. Any more suggestions?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 12th, 2009, 9:03 pm 
Offline

Joined: November 27th, 2008, 10:15 am
Posts: 16
Location: Johannesburg, South Africa
I also couldn't identify the TABTIP.exe application while running, and trying to winkill the pid does not work - UNLESS you run your AHK process as Administrator - but killing the USER tabtip.exe process makes TABTIP rather unstable.

So... and this is a REALLY sucky way to do this, but it works... :-/

Code:
XButton1::
CoordMode, Mouse, Screen ; Set us to screen co-ord mode
MouseGetPos, nX, nY ; Get the current mouse co-ords
SysGet, Mon1, Monitor ; Get the screen resolution
MouseClick, Left, Mon1Right - 47, 8 ; Click the X button for the TIP
MouseMove, nX, nY ; Restore the mouse to it's original co-ords
return


I've simply left-clicked the X button of the TIP (47 means that you shouldn't click the X button of another window by pressing XButton1 more than 1 time by mistake), and 8 is approximately in the middle of the X button height.
Like I said, it's not elegant, but it works...

Naturally, if your TABTIP is docked at the bottom of your screen, you need to modify the X co-ord ( 8 ) to some valid co-ordinate.
If your tabtip is a floating window, well... work it out...

_________________
Keep it Real
Talismaniac
http://www.autohotkey.net/~Talisman


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2009, 4:48 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
Thanks for you help, will post findings ASAP.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2009, 6:20 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
hey,

I tried it out and it obviously works! Thanks Talis. The solution is quite ugly though, so if some one has some other ideas/options it would be great!

Bllly


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2009, 6:16 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
Okay, the solution works, but is not optimal. Is there any way to take into account where the window is floating? Sometimes I accidentally move the TIP window, and then the script obviously doesn't work anymore...

Thanks,
Billy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2009, 6:19 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
Hey,

Does anybody has another solution? Especially the method doesn't work so good when I am moving the TIP around. AutoHotKey is a very powerful program, I'm sure there must be a better solution!

Who can help?
Billy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2009, 1:51 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
Bump... :cry:


Report this post
Top
 Profile  
Reply with quote  
 Post subject: yeah!
PostPosted: February 10th, 2009, 9:29 am 
Offline

Joined: January 6th, 2009, 3:43 am
Posts: 9
I spend roughly half the day on the IRC channel, and the guys there figured it out. Thanks!

Solution:

Code:
XButton1::
PostMessage,0x112,0xF060,,,ahk_class IPTip_Main_Window
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2009, 11:13 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Cool solution.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 10:29 am 
Offline

Joined: August 19th, 2010, 3:29 pm
Posts: 1
:shock: that is 'hide' code.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: G. Sperotto, patgenn123, Tilter_of_Windmills and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group