hk_at Posted January 24, 2016 Share Posted January 24, 2016 Hi, i was googeling around but couldnt find a good answer, but i gess mustbe simple :-) i want to read some value from a third party applikation after is certain button was pressed, something like a waitforButton() i didnt find anything proper in the documentation, maybe someone can give me a hint WinWaitActive("xyz") ; waitforbutton("xyz","", "[CLASS:ThunderRT6CommandButton; INSTANCE:181]") $cname = ControlGetText("xyz", "", "[CLASS:ThunderRT6TextBox; INSTANCE:29]") MsgBox(0, "", $cname) br K Link to comment Share on other sites More sharing options...
water Posted January 24, 2016 Share Posted January 24, 2016 Welcome to AutoIt and the forum! How does the other application change when the button has been pressed? I assume you want to read the result that gets displayed after the action started by the button has ended. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hk_at Posted January 24, 2016 Author Share Posted January 24, 2016 hi exactly i want to read the value from the textbox and store it in a postgresql-db Link to comment Share on other sites More sharing options...
water Posted January 24, 2016 Share Posted January 24, 2016 What is the value of @error after ControlGetText? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
AutoBert Posted January 24, 2016 Share Posted January 24, 2016 (edited) You can solve it like this: WinWaitActive("xyz") $cname= waitforText("xyz","", "[CLASS:ThunderRT6TextBox; INSTANCE:29]") MsgBox(0, "", $cname) Func waitforText($sTitle,$sText,$sCtrlID, $iTimeOut=60) if $iTimeOut<1 Then $iTimeOut=60 $iTimeOut =* 1000 Local $hStart=TimerInit(), $iEnd Local $Text = ControlGetText($sTitle,$sText,$sCtrlID), $NewText Do Sleep(250) $NewText= ControlGetText($sTitle,$sText,$sCtrlID) $iEnd=TimerDiff($hStart) Until $NewText<>$Text or $iEnd>$iTimeOut if $iEnd>$iTimeOut Then SetError(1) Return $NewText EndFunc Edited January 24, 2016 by AutoBert Link to comment Share on other sites More sharing options...
water Posted January 24, 2016 Share Posted January 24, 2016 Seems this type of controls is hard/impossible to automate: Maybe you need to use a copy & paste approach using Send commands. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hk_at Posted January 24, 2016 Author Share Posted January 24, 2016 @error is 0 refering to the idea of autobert, thx a lot but that would liit me to one field, unless i cascade the waitFunctions, isnt? Link to comment Share on other sites More sharing options...
AutoBert Posted January 24, 2016 Share Posted January 24, 2016 I hope i understood your last post correct. Once the text has changed (as result of ButtonClick) you can read all controls text you need until a user action (ButtonClick etc.) is needed. Link to comment Share on other sites More sharing options...
AutoBert Posted January 24, 2016 Share Posted January 24, 2016 I hope i understood your last post correct. Once the text has changed (as result of ButtonClick) you can read all controls text you need until a user action (ButtonClick etc.) is needed. Link to comment Share on other sites More sharing options...
AutoBert Posted January 24, 2016 Share Posted January 24, 2016 I hope i understood your last post correct. Once the text has changed (as result of ButtonClick) you can read all controls text you need until a user action (ButtonClick etc.) is needed. Link to comment Share on other sites More sharing options...
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