
v1rtu0s1ty
Active Members-
Posts
57 -
Joined
-
Last visited
v1rtu0s1ty's Achievements

Wayfarer (2/7)
0
Reputation
-
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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. -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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. -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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. -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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 -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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 -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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? -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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! -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
I want to get the coordinates of the child window. It's the window that contains the error. -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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. -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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 -
Don't know if there is a func like this
v1rtu0s1ty posted a topic in AutoIt General Help and Support
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 -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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! -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
Both didn't help. I'm stucked! Could it be an autoIt bug though? Thanks for the help though. -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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","","") -
issues with WinGetPos function
v1rtu0s1ty replied to v1rtu0s1ty's topic in AutoIt General Help and Support
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.