Jump to content

Recommended Posts

Posted

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

Posted

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!

Posted

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:

Posted Image

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.

Posted Image

you can then add an attachment to the post:

Posted Image

click on "Choose file" to select the file.

Mat

Posted (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 by 131738
Posted

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

  • 9 months later...
Posted

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

Posted

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

It'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.

Posted

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?

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...