AutoHotkey Community

It is currently May 27th, 2012, 12:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: problem with winactivate
PostPosted: January 14th, 2010, 11:28 am 
Offline

Joined: February 6th, 2005, 10:40 pm
Posts: 26
I have this:
Code:
#2::
 DetectHiddenWindows, on
 IfWinExist, ahk_class OpWindow
  {
  WinActivate, ahk_class OpWindow
  }
  Else
  {
  Run "E:\Program Files\Opera\opera.exe" 
  WinActivate, ahk_pid opera.exe
  }
return


in this the winActivate command doesn't seem to be working properly. when the shortcut is pressed The window (opwindow) is not brought to the front, and any existing window that had focus, loses its focus. So the winactivate command is called but it fails to bring the window to the front.

Help please


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 14th, 2010, 11:57 am 
I think what you are detecting (with DetectHiddenWindows, on) is the tray icon (which has no displayable window). This works just fine for me.
Code:
#2::
 ;DetectHiddenWindows, on ; <---- don't turn this on
 IfWinExist, ahk_class OpWindow
  {
  WinActivate, ahk_class OpWindow
  }
  Else
  {
  Run "E:\Program Files\Opera\opera.exe" 
  WinActivate, ahk_pid opera.exe
  }
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 14th, 2010, 1:07 pm 
Offline

Joined: February 6th, 2005, 10:40 pm
Posts: 26
you are right, disabling detechhiddenwindows almost fixes this. It works if the window if minimized, but doesn't work if the window has been traymin'ed (using some other program) :(


Also I have this for the application xplorer2

Quote:
#3::
DetectHiddenWindows, on
IfWinExist, ahk_class ATL:ExplorerFrame
{
WinActivate, ahk_class ATL:ExplorerFrame

}
Else
{
Run "E:\Program Files\zabkat\xplorer2\xplorer2_UC.exe"
WinActivate ahk_class ATL:ExplorerFrame

}


this one works perfectly.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav and 23 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