AutoHotkey Community

It is currently May 26th, 2012, 7:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: May 1st, 2009, 3:37 pm 
Offline

Joined: March 16th, 2006, 5:01 pm
Posts: 150
I'm not sure if it's because I've moved to windows server 2008 64-bit or what, but winactivate brings window to front, but not focus anymore.

I have a lots of shortcuts that use this. The idea is to start using the app right away, not having to click on it.

The same code works as expected in XP. There I run as admin, in windows server 2008 I don't. maybe there's a security setting to prevent focus stealing?

Is this something anyone can relate to?
Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 1st, 2009, 4:03 pm 
Offline

Joined: March 10th, 2006, 7:41 pm
Posts: 89
Tried winrestore or winactivate?

I have sometimes had to use winrestore to switch to a window because winactivate was maximizing the window, and I didn't want it maximized.

I don't know how that is related but maybe worth a try.

Also if its a startup deal, something may be loading behind it to take the focus away?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 1st, 2009, 4:19 pm 
Click --> New program window appears behind all other open windows on a Windows 2000-based, Windows XP-based, Windows Server 2003-based, or Windows Vista-based computer


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 1st, 2009, 4:46 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
It's possible that there's something not processing correctly in response to the WinActivate command, you can try following it up with a WinWaitActive command and see if that helps.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 1st, 2009, 10:41 pm 
Offline

Joined: March 16th, 2006, 5:01 pm
Posts: 150
WilliamGatesIII: it's not that the window appears behind. it's on top, but not on focus (i.e., typing will not send chars to that window).

I just realized it's not with all windows.

R (www.r-project.org) gets focus fine.

vim does too, but the title bar is greyed out.

TotalCommander 7.5 beta 2 does not get focus (typing doesn't work).
WinWaitActive doesn't seem to help. In fact, it doesn't bring up the window at all.

Code:



Any more cues? Thanks

Code:
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function: appShortcut
*/
appShortcut(pathToExe){
     StringSplit, array, pathToExe, \
     size := array0
     process2check := array%size%
     ;msgbox, %process2check%
     process, exist, %process2check%
   PID=%errorlevel%
    if PID=0
      Run, %pathToExe%
    else
      WinWait, ahk_pid %PID%
     WinActivate
  Return
}


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: Google Feedfetcher, joetazz, krajan, over21, RaptorX, rbrtryn, SKAN and 72 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