Jump to content

get the information from a form


Recommended Posts

just like the autoit Au3Info.exe

i am making a autotuning gituar and for that i need to get some frequecies out of a program

they stand in visible text so i think its possible

tried a few things but cant find the command to get the same text as the visble text.

Au3Info.exe show this @ visible text

Guitar 6 String
Gauge
Pitch Range: 
2
Spin1
Frequency: 
Average Frequency: 
 252.47
 261.66
View: 
BUYNOW
Target Frequency: 
 246.94

and for ID and so

>>>> Window <<<<
Title:  In-Tune Multi-Instrument Tuner
Class:  #32770
Position:   682, 357
Size:   595, 506
Style:  0x94CF0144
ExStyle:    0x00050100

>>>> Control <<<<
Class:  RICHEDIT
Instance:   2
ID: 1028
Text:   
Position:   993, 826
Size:   65, 23
ControlClick Coords:    26, 12
Style:  0x50000880
ExStyle:    0x00000204

the control is 1028 is i possible to get the information (visible text) that is in that controll or at least a way to get the info just like autoit v3 info

so i can stripp it?

Link to comment
Share on other sites

  • Moderators

$text = ControlGetText ( "In-Tune Multi-Instrument Tuner", "", "[CLASSNN:RICHEDIT2]" )

Doesn't work?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

now tried this but the output is emty :)

$text = ControlGetText ( "In-Tune Multi-Instrument Tuner", "", "1028" )
;$text = WinGetText("In-Tune Multi-Instrument Tuner")
MsgBox(0, "Text read was:", $text)
You put your control ID in quotes, which made it a string vice integer variable. In many cases AutoIt does automatic conversion when string numbers are given in place of integers, but here the parameter could legitimately be either a string or integer variable so no conversion is done. A control ID of 1028 vice "1028" would have worked. Demo:
Global $sWinTitle = "Untitled - Notepad"
Global $sClassNN = "[CLASSNN:Edit1]"
Global $sCtrlID = "15"
Global $iCtrlID = 15

Global $PID = Run("notepad.exe")
WinWait($sWinTitle)
ControlSetText($sWinTitle, "", $sClassNN, "This is a test.")

$sText = ControlGetText($sWinTitle, "", $sClassNN)
ConsoleWrite("Debug: ClassNN = " & $sClassNN & "  Text = " & $sText & @LF)

$sText = ControlGetText($sWinTitle, "", $sCtrlID)
ConsoleWrite("Debug: String CtrlID = " & $sCtrlID & "  Text = " & $sText & @LF)

$sText = ControlGetText($sWinTitle, "", $iCtrlID)
ConsoleWrite("Debug: Integer CtrlID = " & $iCtrlID & "  Text = " & $sText & @LF)

;)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thnx man!! It works :) Next step, controlling relays with serial ports ;) another challenge... You will hear from me, when the job is done, or if I encounter any problems witch I cant figure out myself. ic tutorials with visual basic, but is it possible to control serial in autoit? It would be handy if i could use just one script.... :D

Link to comment
Share on other sites

Thnx man!! It works ;) Next step, controlling relays with serial ports :D another challenge... You will hear from me, when the job is done, or if I encounter any problems witch I cant figure out myself. ic tutorials with visual basic, but is it possible to control serial in autoit? It would be handy if i could use just one script.... :(

Search the Forums a bit. I believe martin did some good UDFs with a COM Port .dll.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

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