Jump to content
Sign in to follow this  

Dynamic Autoit Spy Question

Recommended Posts

I am trying to recieve info from the autoit windows spy but by using a second running version of autoit windows spy...So far I have determined that:

title=AutoIt v3 Active Window Info (although (paused)AutoIt v3 Active Window Info is what you see with the eye, second running version only seems to see

AutoIt v3 Active Window Info)


Class: Edit1

Basicly trying to get the text from autoit spy in a more direct way than to:

right click>select all>paste the info in from autoit spy.

Among other things I have tried:

AutoItSetOption("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
$text = WinGetText("AutoIt v3 Active Window Info", "Edit1")
MsgBox(4096, "Text read was:", $text)

$text = WinGetText("AutoIt v3 Active Window Info", "")
MsgBox(0, "Text read was:", $text)

$handle = WinGetHandle("classname=AU3Reveal", "Edit1")
MsgBox(0, "Text read was:", $handle)

$var = ControlGetText("AutoIt v3 Active Window Info", "Text:", "Edit1")
MsgBox(0, "Text read was:", $var)

$text = WinGetText("AutoIt v3 Active Window Info", "Text:")
MsgBox(0, "Text read was:", $text)

I know some of these are messed up because I have been copying between codes in SciTE so forgive me. I am recieving either a 1 or nothing at all as an output, but doing these same commands on an untitiled notepad gives me what I am looking for.

Maybe I am just getting a 1 to signify a sucess rather than a string like I am looking for but seems to work on notepad's edit control.

Perhaps (but doubtful) using two instances of the same windows spy being used on each other is producing the wrong output (latest beta) although it's probably not healthy.

Just looking to make the info I get from autoit spy be dynamic in a sense that I can grab the classnames and other info from autoit spy, have the script create a new .au3 file with the new variables pasted in to work on virtually most simple programs that use an edit1 control.. Thus not having to know anything about the program I am looking to script to.

As an example, many programs have an edit1 field like notepad. I want to copy that text to a .txt file. The script will be run on another computer by another user to automate getting text from the edit1 box like stated above. As in this case and many cases where people are helping each other on here, the program the other person needs help with is either too much of a hassle to download and help them out with, or is a commercial program costing money. Thus would have to purchase the program yourself or instruct them on either how to use Autoit windows spy and relay that info back to you, or have them do it themselves and learn autoit. (not a bad idea but.. :ph34r: not the point)

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...