ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

how to get to a dialog window that won't come into focus by using the keyboard?

<< < (2/8) > >>

nudone:
yes, i think that might be the way to go. i'll see if i can figure something out - but i'll probably have to post a coding snack request.

lanux128:
here, you go.. just substitute your own dialog box's id in the WindowsID section.


--- ---#Persistent
#SingleInstance force
#NoEnv
SetTitleMatchMode 2 ; partial title match

WindowsID=Open ahk_class #32770  ; windows title and ahk class goes here. either will do..

SetTimer, ActivateMe, 500  ;increase or decrease timer
Return

ActivateMe:
;auto-activate
IfWinExist %WindowsID%
  {
  WinActivate
  ;do something here like press the ok button
  ;ControlClick, OK
  ;sleep for a while - good for cpu cycle
  Sleep, 3000
  }
Return
Source: http://www.autohotkey.com/docs/commands/IfWinExist.htm

nudone:
excellent. i think this is working correctly.

thanks very much for that, lanux128. i'm sure it would have taken me a few hours to figure that out.

nudone:
aaaaargh. i can't believe it. it doesn't work. seems to have been just the stupid nature of how it comes into focus of it's own accord sometimes.

i'm blaming FileZilla on this. it's making itself unfocussed somehow. the swine.

edit:
i think the little ahk script is working - something just upsets it sometimes.

lanux128:
i use filezilla too. where is this option? maybe i can try to get it to appear on my PC.

Edit:
in this thread here. this guy has the opposite problem, it seems but the reply is quite enlightening.

FileZilla only sets the focus window of its own process to the file exists dialog, it does not mark itself as the active program. Further, it requests user attention through some well-documented API. Either GTK+ or your window manager misinterprets this and makes the program active.-site admin
--- End quote ---


Edit2: maybe the script's timing is flaky, try changing Sleep, 3000 to a smaller number.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version