danusko Posted September 21, 2020 Posted September 21, 2020 Hi, i tried search to solve my problem but i wasnt succsessfull. I try to check, if any text on web page exists. i tried a lot of scripts, but nothings worked. Local $text = WinGetText("[Chrome_WidgetWin_1]", "get") MsgBox(0, "Text read was:", $text) my last try is this: Local $text = ControlGetText(WinGetTitle("Checking if Text Exists"), "Text", "[CLASS:Chrome_WidgetWin_1; INSTANCE:1]") I try to check if text "text" exists on the page. But this return blank. But on the page wich i try is this "text". Any suggestions? thx a lot
Nine Posted September 21, 2020 Posted September 21, 2020 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
danusko Posted September 21, 2020 Author Posted September 21, 2020 Thanks for help. So it doesnt exists solution in Autoit existing commands? it is neccsessary to use this drivers and exe files and so? thx
zeenmakr Posted September 21, 2020 Posted September 21, 2020 3 hours ago, danusko said: So it doesnt exists solution in Autoit existing commands? it is neccsessary to use this drivers and exe files and so? im not well versed but my understand is microsoft has switched to a new framework and autoit won't work natively for alot of new app anymore but there is project for it, you might want to look into IUIAutomation. now as far as chrome goes it is 'dom' not the same as your typical windows app. so other chrome udfs and webdriver is required to communicate with chrome. Chrome by default do support 'chrome native messenging' which accept external JavaScript input and spit out output in the form of input.txt and output.txt -think window cmd/command line but with JavaScript. here is alternative chrome udf might want to read first several pages or all for updated fixes to setup correct. you can get texts or even automate login to website from autoit. let me know over there if you have questions. 5 hours ago, danusko said: I try to check if text "text" exists on the page. But this return blank. But on the page wich i try is this "text". Local $text = ControlGetText(WinGetTitle("Checking if Text Exists"), "Text", "[CLASS:Chrome_WidgetWin_1; INSTANCE:1]") with that, you are not using ControlGetText() correctly. try this on notepad.exe and bring up 'save as' window type something into 'file name:' then run the code below. See attached screenshot Local $text = ControlGetText("[CLASS:#32770; TITLE:Save As]", 'Edit1') MsgBox(0, 'File Name is:', $text) 5 hours ago, danusko said: i tried a lot of scripts, but nothings worked. Local $text = WinGetText("[Chrome_WidgetWin_1]", "get") MsgBox(0, "Text read was:", $text) again you did have it setup correctly. try this in new notepad.exe, type something in it then run the code bellow Local $text = WinGetText("[CLASS:Notepad; TITLE:Untitled - Notepad]") MsgBox(0, "Text read was:", $text)
danusko Posted September 22, 2020 Author Posted September 22, 2020 For Notepad it is working but i need it for Chrome. Ok, i understand, that its not so easy to make it for chrome. I dont wanted to use some other programs or exe files to achive my goals. But thank you very much for your help.
zeenmakr Posted September 22, 2020 Posted September 22, 2020 5 hours ago, danusko said: For Notepad it is working but i need it for Chrome. it's intended to demonstrate how to get those functions working. 5 hours ago, danusko said: i understand, that its not so easy to make it for chrome. everything has a limit it's not about easy or hard 5 hours ago, danusko said: I dont wanted to use some other programs or exe files to achive my goals. if your goal is to work with live webpage preloaded in chrome you don't have any other options. you have to understand that web developers or a like are the people need to work with web browsers professionally and that is how they came up with the tools. if you just need to quickly go on to a website to check a status of a particular thing. you might want to look in to _INetGetSource(), _IEDocReadHTML(). again just so you understand, these udfs were developed -thought you might not see- using existing exe called 'internet explorer'. there' also WinHTTP udf and wget (external exe) or do a select all > copy using Send() and ClipGet() then StringRegExp()
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