Hi ho
ich wolle eine label von einem anderen programm auslesen und bei mir in der gui anzeigen lassen
komme da aber nicht so wirklich weiter
kann mit vllt jemand helfen ?
Danke schon mal
Hi ho
ich wolle eine label von einem anderen programm auslesen und bei mir in der gui anzeigen lassen
komme da aber nicht so wirklich weiter
kann mit vllt jemand helfen ?
Danke schon mal
ControlGetText
GUICtrlCreateLabel
hmm also ich dachte ich kann das uch so machen
[autoit]#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 595, 571, 85, 117)
$Label1 = GUICtrlCreateLabel("", 104, 80, 156, 73)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
$lab1 = ControlGetText("OBD.exe")
$lab2 = ControlGetText("[CLASS:ThunderRT6TextBox; INSTANCE:58]")
guictrlread($label+$labe2)
GUICtrlSetData($Label1,($lab1,$lab2)
[autoit]$lab1 = ControlGetText("OBD.exe") $lab2 = ControlGetText("[CLASS:ThunderRT6TextBox; INSTANCE:58]") guictrlread($label+$labe2) GUICtrlSetData($Label1,($lab1,$lab2)
[/autoit]
was wird denn das?
Was du dabei tust: Du willst aus einer Exe was auslesen indem du sie als control behandelst, danach leist du den text eines Labels eines Programm es aus. Dieses Ausgelesene versuchst du als Control zu handhaben und liest es nochmals aus?
deswege bitte ich ja um hilfe
ich komme damit nicht so wirklich klar
WAS genau ist denn dein Problem? Meine Kristallkugel ist grad leider nicht verfügbar, ist mir gestern vom Tisch gefallen.
WAS genau ist denn dein Problem? Meine Kristallkugel ist grad leider nicht verfügbar, ist mir gestern vom Tisch gefallen.
Steht oben was ich machen möchte !
Aber hier nochmal
Ich möchte ein label von einem programm auslesen und in meiner Gui
als Label wiedergeben
Dafür hab ich dir die nötigen Informationen gegeben. Aber du scheinst ja imemrnoch ein Problem zu haben und das sollst du nennen...
n und das sollst du nennen...
habe ich auch aber ok....
nochmal
Ich bekomme keinen wert in mein label !!!
schau dir die Funktionen die er dir genannt hat mal an
Du musst um controls zu verwenden mit wintitel usw arbeiten, nicht mit einer exe, das steht genauer in der hilfe, mehr als rauskopieren könnte ichs nun auch nicht.
Das hier kann dir vielleicht auch noch helfen: http://translation.autoit.de/onlinehilfe/tu…pad/notepad.htm
Die 2 Teile am Anfang und am Ende des Tutorials, bei dem es über das AutoIt Windows Info Tool geht, könnten hilfreich für dich sein.
also ich komme da nicht weiter ich habe jetzt so viel hin und her probiert und schaffe es einfach nicht
hier nochmal mein versuch
[autoit]#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 595, 571, 85, 117)
$Label1 = GUICtrlCreateLabel("", 104, 80, 156, 73)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
$lab1 = WinGetText("OBD")
$lab2 = ControlGetText("[CLASS:ThunderRT6TextBox; INSTANCE:58]")
GUICtrlSetData($Label1,($lab1,$lab2)
[/autoit]#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 595, 571, 85, 117)
$Label1 = GUICtrlCreateLabel(ControlGetText("Fenstername", "", "ControlID, ControlHandle, ..."), 104, 80, 156, 73)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Danke aber das geht net
[autoit]#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 595, 571, 85, 117)
$Label1 = GUICtrlCreateLabel(ControlGetText("OBD", "[CLASS:ThunderRT6TextBox; INSTANCE:56]", "0"), 104, 80, 156, 73)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Es ist schwer dir zu helfen, weil man das Programm, bei dem du den Text auslesen willst, nicht hat.
Hast du Class und Title usw. aus dem Window Info Tool?
ja klar hier
>>>> Window <<<<
Title: OBD
Class: ThunderRT6FormDC
Position: 100, 100
Size: 501, 566
Style: 0x16CA0000
ExStyle: 0x00040100
Handle: 0x00000000000707AC
>>>> Control <<<<
Class: ThunderRT6TextBox
Instance: 57
ClassnameNN: ThunderRT6TextBox57
Name:
Advanced (Class): [CLASS:ThunderRT6TextBox; INSTANCE:57]
ID: 244
Text: 0
Position: 128, 104
Size: 105, 19
ControlClick Coords: 2, 7
Style: 0x540108C0
ExStyle: 0x00000004
Handle: 0x00000000000404A8
>>>> Mouse <<<<
Position: 291, 112
Cursor ID: 0
Color: 0xFFFFFF
>>>> StatusBar <<<<
[/autoit] [autoit][/autoit] [autoit]>>>> ToolsBar <<<<
[/autoit] [autoit][/autoit] [autoit]>>>> Visible Text <<<<
[/autoit]Ich denke mal der zweite Parameter bei deinem Script ist falsch.
http://translation.autoit.de/onlinehilfe/fu…trolGetText.htm
Dort steht als zweiter Parameter:
text - Der Text des Fensters, auf das zugegriffen werden soll.
ControlGetText("[CLASS:ThunderRT6TextBox; INSTANCE:56]", "", ....
Hatte ich schon danke
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 595, 571, 85, 117)
$Label1 = GUICtrlCreateLabel("", 104, 80, 156, 73)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
$lab1 = WinGetText("OBD")
$lab2 = ControlGetText("[CLASS:ThunderRT6TextBox; INSTANCE:58]")
GUICtrlSetData($Label1,($lab1,$lab2)
[/autoit]#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 595, 571, 85, 117)
$Label1 = GUICtrlCreateLabel(ControlGetText("OBD", "","[CLASS:ThunderRT6TextBox; INSTANCE:57]"), 104, 80, 156, 73)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Ich frag mich, was daran jetzt so schwer war...