| View previous topic :: View next topic |
| Author |
Message |
aramilmoonmist
Joined: 10 Nov 2006 Posts: 3
|
Posted: Fri Nov 10, 2006 1:07 am Post subject: basic winactivate and ifwinexist problems |
|
|
im trying to write a script that highlights one of my message boxes in trillian (an aim like program), and then runs some code. i cant get either ifwinexist or winactivate to recognize the title.
| Code: | SetTitleMatchMode, 2
detecthiddenwindows on
IfWinExist, ;no matter what title or text i put, it wont recognise it
{
WinActivate
} |
active window info says:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
Their User Name : AIM - My User Name
ahk_class icoAIM
>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<
Unicode Trillian Window
Unicode Trillian Window
with our names obviously replaced. and yes, i know its case sensitive, and ive tried all combinations of title and text. ive used it with notepad, and it seems to work.
thanks in advance
-Aramil |
|
| Back to top |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Fri Nov 10, 2006 2:24 am Post subject: |
|
|
Try this.
| Code: |
SetTitleMatchMode, 2
detecthiddenwindows on
IfWinExist, : AIM -
{
WinActivate
}
Return |
Of course setup like this it would only work if the window Existed right as you run the script. If you want it to continously check to see if that window exists you need to put it in a loop.
| Code: |
SetTitleMatchMode, 2
detecthiddenwindows on
Loop {
Sleep 50
IfWinExist, : AIM -
WinActivate
}
Return |
|
|
| Back to top |
|
 |
aramilmoonmist
Joined: 10 Nov 2006 Posts: 3
|
Posted: Fri Nov 10, 2006 2:31 am Post subject: |
|
|
nope, still doesnt select it at all
-Aramil |
|
| Back to top |
|
 |
aCkRiTe
Joined: 21 Jul 2006 Posts: 517
|
Posted: Fri Nov 10, 2006 2:33 am Post subject: |
|
|
| Does .AHK's script activate the window though? |
|
| Back to top |
|
 |
aramilmoonmist
Joined: 10 Nov 2006 Posts: 3
|
Posted: Fri Nov 10, 2006 2:36 am Post subject: |
|
|
no, tired that too
-Aramil |
|
| Back to top |
|
 |
quicktest
Joined: 30 Jul 2004 Posts: 42
|
Posted: Fri Nov 10, 2006 2:44 pm Post subject: |
|
|
How about try the following for troubleshooting, to find out if it's the window detection or the activation that's failing. Just another 0.02 suggestion from me.
| Code: | SetTitleMatchMode, 2
detecthiddenwindows on
IfWinExist, : AIM -
{
MsgBox, Window Found
WinActivate
}
Return |
|
|
| Back to top |
|
 |
|