AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: March 18th, 2009, 10:51 pm 
Offline

Joined: November 29th, 2008, 12:35 am
Posts: 111
Location: United Kingdom
I am desinging a simple program that replaces abbreviations with the full words when typed, all abbreviations and expanded results are user defined.
What I seek help with is this-
Windows live messenger chat windows have different names ( named after the contact you are chatting with)
How would I go about using winactive to see if there is a chat box open when all of the chat boxes are named differently?

_________________
Adam
http://moourl.com/8w0tx
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2009, 4:28 pm 
Offline

Joined: November 29th, 2008, 12:35 am
Posts: 111
Location: United Kingdom
Some help please someone?

_________________
Adam
http://moourl.com/8w0tx
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2009, 9:29 pm 
Should be very simple. You can find which process a window belongs to. If the PID of the window is the same as the PID of MsnMsgr.Exe, it's an messenger window.

Get what I mean?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2009, 9:41 pm 
This script will check and tell you if the current active window (when you press ^+s) belongs to MsnMsgr.Exe

Code:
^+s::
WinGetTitle, Current_Window, A
WinGet, Window_PID, PID, %Current_Window%
Process, Exist, MsnMsgr.Exe
Process_ID := ErrorLevel
If (Window_PID == Process_ID)
   MsgBox, This window belongs to MsnMsgr.Exe
Else
   MsgBox, This window does not belong to MsnMsgr.Exe
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 20th, 2009, 6:29 pm 
Offline

Joined: November 29th, 2008, 12:35 am
Posts: 111
Location: United Kingdom
Wicked - Guest wrote:
This script will check and tell you if the current active window (when you press ^+s) belongs to MsnMsgr.Exe

Code:
^+s::
WinGetTitle, Current_Window, A
WinGet, Window_PID, PID, %Current_Window%
Process, Exist, MsnMsgr.Exe
Process_ID := ErrorLevel
If (Window_PID == Process_ID)
   MsgBox, This window belongs to MsnMsgr.Exe
Else
   MsgBox, This window does not belong to MsnMsgr.Exe
Return


Many thanks :D

_________________
Adam
http://moourl.com/8w0tx
Image


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: DataLife, notsoobvious and 11 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