Mat Posted November 21, 2009 Author Posted November 21, 2009 It's working fine over here... What happens when you run the following script and drag it over the label? #Include<GUIFinder.au3> $hGUI = GUICreate ("Test") $hFinder = GUICtrlCreateFinder (2, 2) GUICtrlCreateLabel ("Drag over me!!", 40, 40, 100, 20) GUISetState () While 1 Switch GUIGetMsg () Case -3 Exit Case $hFinder MsgBox (64, "Congrats", "You selected a " & $FINDER_CLASS & " control." & @CRLF & @CRLF & "The text of the control was: """ & _ ControlGetText ($FINDER_HWND, "", "") & """") EndSwitch WEnd Mat AutoIt Project Listing
131738 Posted November 21, 2009 Posted November 21, 2009 It's working fine over here... What happens when you run the following script and drag it over the label? #Include<GUIFinder.au3> $hGUI = GUICreate ("Test") $hFinder = GUICtrlCreateFinder (2, 2) GUICtrlCreateLabel ("Drag over me!!", 40, 40, 100, 20) GUISetState () While 1 Switch GUIGetMsg () Case -3 Exit Case $hFinder MsgBox (64, "Congrats", "You selected a " & $FINDER_CLASS & " control." & @CRLF & @CRLF & "The text of the control was: """ & _ ControlGetText ($FINDER_HWND, "", "") & """") EndSwitch WEnd Mat I am a Chinese, relying on machine translation post, detecting a third party window, "Static" control is invalid, where I do not know how to upload pictures? ! Thanks!
Mat Posted November 21, 2009 Author Posted November 21, 2009 I am a Chinese, relying on machine translation post, detecting a third party window, "Static" control is invalid, where I do not know how to upload pictures? ! Thanks!Ok. When you use the Au3Info tool that comes built in with the AutoIt install, does the same thing happen, or does it work then? As far as I am aware they both use (eventually) the same function "WindowFromPoint", and then "GetClassName" to get the class.this is the result on my computer from a test I did:Although the "third party window" is created using AutoIt, It should act the same as any other third party app. If neither are returning "Static" for the class, then the control is not a Static control.To upload a picture, you need to use the full editor when replying by clicking "Add Reply" at the bottom of the page.you can then add an attachment to the post:click on "Choose file" to select the file.Mat AutoIt Project Listing
131738 Posted November 21, 2009 Posted November 21, 2009 (edited) "You can then add an attachment to the post:" The following sentence can not find the page! Do not see "Choose file" button on the page. Thanks! ! Permissions may be insufficient Edited November 21, 2009 by 131738
Mat Posted November 21, 2009 Author Posted November 21, 2009 kk. I see whats happening now. I *think* its becouse the input or ControlGetText is not accepting unicode characters. Although I am probably way out of my depth saying that. I am fairly sure the problem comes from the fact that you are using Chinese characters. I am sorry but I do not know how to solve that problem. Please can you run this code and tell me the result? #Include "GUIFinder.au3" $hGUI = GUICreate ("Finder Tool", 100, 40, -1, -1, -1, 8) $hFinder = GUICtrlCreateFinder (31, 2) GUISetState () While 1 Switch GUIGetMsg () Case -3 Exit Case $hFinder $sText = ControlGetText ($FINDER_HWND, "", "") MsgBox (0, "Text", "text: " & $sText & @CRLF & "length: " & StringLen ($sText)) EndSwitch WEnd If it the "length: " result is not "0" then its a problem with the input, else it is not reading the characters properly. I will do some reading into how to use Chinese letters in an AutoIt script Mat AutoIt Project Listing
Mat Posted November 21, 2009 Author Posted November 21, 2009 Ok. Good to see thats working. I do not know how to make it work with an input then. Mat AutoIt Project Listing
131738 Posted November 22, 2009 Posted November 22, 2009 Thank you to guide! To continue to look forward to your script !
AlmarM Posted August 28, 2010 Posted August 28, 2010 I think it's working different on Windows Vista x64 Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
Mat Posted August 28, 2010 Author Posted August 28, 2010 I think it's working different on Windows Vista x64 can you give details? I haven't looked at that code for a while.... In which time I've used it a couple of times for other programs, without any errors here.And does different mean wrong.... or just different? Mat AutoIt Project Listing
AlmarM Posted August 28, 2010 Posted August 28, 2010 can you give details? I haven't looked at that code for a while.... In which time I've used it a couple of times for other programs, without any errors here.And does different mean wrong.... or just different? MatIt's not returning what it's supposed to be returning.I tried selecting a button "Class: Button6" (found with autoit window tool) and GUICtrlCreateFinder returns "Photoshop". Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
Mat Posted August 29, 2010 Author Posted August 29, 2010 I'll have a look. This is now on the 'Rewrite' pile, functions are being renamed to be more like the standard UDF's, different icons are going to be supported, and I'm going to make the outline better. Are you sure that's not the parents class or anything like that? AutoIt Project Listing
AlmarM Posted August 30, 2010 Posted August 30, 2010 I tested it on WinXP on my work, works different from Win Vista x64. Now it returns "PSViewC" with "$FINDER_CLASS". Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now