Jump to content

v1rtu0s1ty

Active Members
  • Posts

    57
  • Joined

  • Last visited

v1rtu0s1ty's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. btw, I just found another tool, autohotkey. I found a code from the help file Loop { Sleep, 100 MouseGetPos, , , WhichWindow, WhichControl ControlGetPos, x, y, w, h, %WhichControl%, ahk_id %WhichWindow% ToolTip, %WhichControl%`nX=>%X%`tY=>%Y%`nW=>%W%`t=>%H% } And it's able to retrieve correct coordinates and dimensions. However, I'm already use to the autoit coding, it's much simpler to understand. And also, I have spent a day learning and modifying Inolesence text reader in gui mode(aka OCR). I don't want to spend another day or 2 learning new language. Please see attachment.
  2. I'm sorry, I really didn't mean to tone that way. That's the problem of posting messages. Sure, I will look into what you have mentioned, WinSearchChildren. Is there other way I can troubleshoot to facilitate patching? Thanks again.
  3. Something is really wrong. This is the latest code to really verify all the dimensions of the questioned classnames. AutoItSetOption("WinTitleMatchMode", 4) WinActivate("Rekon 2000") $WinList = WinList() For $i = 0 To $WinList[0][0] $Class = GetClassName($WinList[$i][1]) If $Class = "rek20006c000000" or $Class = "rek20006c0000002" Then $childwindow = WinGetTitle($WinList[$i][1]) $Dimension = WinGetPos($childwindow) msgbox(0,"Dimensions", $Dimension[0] & ", " & $Dimension[1] & ", " & $Dimension[2] & ", " & $Dimension[3]) EndIf Next Func GetClassName($hwnd) Local $ret = DllCall("user32.dll", "int", "GetClassName", "hwnd", $hwnd, "str", "", "int", 32768) If Not @error Then Return $ret[2] EndFunc Not one result got close to what I was expecting. Please see all the 4 screenshots. So can we consider this is a bug? Thanks.
  4. The dimensions that were shown was for the parent window. The X,Y was -4, -4 and the width and height was 1032, 748. I've attached a screenshot. Thanks for digging this out. Any more ideas? EDIT: I'm adding a text file attachment that contains the HANDLE and CLASSNAMES based from your winlist code. handles_and_classnames.txt
  5. I tried it and it still doesn't help. Reading the manual for ControlGetPos, it's expecting a controlID in the last parameter. However, we are supplying a classname. And also, AutoIT window info is not able to pull any control ID once I hover the mouse on that error window. Any more ideas? I'm using AutoIT version 3
  6. I know what you mean in your code. The reason I was getting the error is because, the search string classname is not being seen. How come, it's still not seen?
  7. Here is my latest code and it fails: AutoItSetOption("WinTitleMatchMode", 4) if WinExists("classname=rek20006c0000002","") Then WinActivate("Rekon 2000") WinActivate("classname=rek20006c0000002") $Dimension = ControlGetPos("classname=rek20006c000000", "", "rek20006c0000002") msgbox(0,"Dimensions", $Dimension[0] & ", " & $Dimension[1] & ", " & $Dimension[2] & ", " & $Dimension[3]) endif Please see attachment. Thanks for helping out!
  8. I want to get the coordinates of the child window. It's the window that contains the error.
  9. I've done that. Didn't help. WinGetTitle("classname=rek20006c0000002") and WinGetText("classname=rek20006c0000002") returns 1 WinList("classname=rek20006c0000002") gives out a size of 1 I know, there is a possibility that is is a bug! How else can I test? However, WinClose or WinKill, WinSetState doesn't do anything to the window. I've wasted many days just for this coordinate and size. Lastly, VB handle enumerator shows only 1 instance of rek20006c0000002.
  10. I downloaded a vb api that enumerates all windows including handles, caption and classnames. I looked for the classname rek20006c0000002 and saw one, however, I saw 3 other classes in classname=rek20006c000000. And I'm very sure that the classname is rek20006c0000002 by hovering the mouse on that window. I have actually attached a screenshot at the beginning of this thread and you will see it there. The class rek20006c000000 is the parent window. And the classname for the workspace underneath rek20006c0000002 window is rek20006c0000001. To really verify this, I had to manually run the application and execute this code: It gave me a result of (300,200) coordinates and (66,22) for the height and width. WinActivate("Rekon 2000") AutoItSetOption("WinTitleMatchMode", 4) $Dimension = WinGetPos("classname=rek20006c0000002","") msgbox(0,"Dimensions", $Dimension[0] & ", " & $Dimension[1] & ", " & $Dimension[2] & ", " & $Dimension[3]) However, if I do the code below, it gets the dimension and coordinates of the parent window WinActivate("Rekon 2000") AutoItSetOption("WinTitleMatchMode", 4) $Dimension = WinGetPos("","") msgbox(0,"Dimensions", $Dimension[0] & ", " & $Dimension[1] & ", " & $Dimension[2] & ", " & $Dimension[3]) Please look at the new attachments. The left attached is the parent window. The right pic attached is the child window that I really want to get working. New addtion: I added this and it showed a SIZE of 1 but the Title was blank. I did this to make sure there is no other classname=rek20006c0000002 which proved it. $winvar = WinList("classname=rek20006c0000002") Msgbox(0,"","SIZE:" & $winvar[0][0]) For $i = 1 to $winvar[0][0] MsgBox(0, "Details", "Title=" & $winvar[$i][0] & @LF & "Handle=" & $winvar[$i][1]) Next Thanks for looking into this. N
  11. I'm not sure if there is a function that's already doing this. It is similar to WinGetHandle's approach. I executed a vb program that will enumerate window properties such as handle, title and classnames of all window that exists. Here is my situation. I have windows that have the same classnames, but they don't show up at the same time. I was hoping that if there was a function wherein we can specify the classnameNN and it would spit out the title. $WindowTitle = WinGetTitlebyClassNameNN("classname=somewin002") Msgbox(0, "", "Title found is " & $WindowTitle) With that, I can do this While 1 $WindowTitle = WinGetTitlebyClassNameNN("classname=somewin002") if $WindowTitle = "WARNING - ODBC issues" Then ;some codes here endif if $WindowTitle = "WARNING - SQL down" Then ;some codes here endif if $WindowTitle = "WARNING - Logspace full" Then ;some codes here endif Wend This is really good for some windows that dynamically updates the title. Thanks guys, Neil
  12. Cool! I hope this can be fixed soon. I used Spy++ and it's able to get the x, y and size properly. Btw, I don't know how to report it. Can you report it please? Thanks for doing some test too!
  13. Both didn't help. I'm stucked! Could it be an autoIt bug though? Thanks for the help though.
  14. It doesn't work. Reading the manual, ControlGetPos will only be applicable to a control inside the window. I tried this and it gave me different numbers. $Dimension = ControlGetPos("classname=rek20006c0000002","","")
  15. It is legible. If you are using IE, then you have to hover the mouse on top of the image and wait for the icon at the bottom right. Once it appears, click it, it will enlarge or view the actual image size. You have to do this after you have clicked the link in autoit. This is one thing I hate in IE most especially when a new browser is loaded and not maximized.
×
×
  • Create New...