1 post in this topic
Hello all! I have had some issues reading text from different types of windows, occasionally, specifically with controlgettext.
**Before I begin, I know there are better ways to do what I attempt in the example below. That's not the point of this post. The point is my issues with controlgettext.
I am about to cite an example with an application you may be familiar with called SpeedFan (v4.52). My problem is not specific to speedfan, it is simply the most recent and easily reproducible example I can think of.
So, the goal of the script below is to get a string of text containing the current fan RPMs from the highlighted control in the screenshot below (see "speedfan_control_details.png").
Now, here's a simple script for grabbing the window handle and reading the text from that control:
$wintitle = "SpeedFan 4.52" $controlID = "197934" ;will be reformatted as "[ID:######]" $hwnd = wingethandle($wintitle) if @error<>0 then msgbox(0, "WinGetHandle", "FAILURE. @error="&@error) Exit EndIf $text = ControlGetText($hwnd, "", "[ID:"&$controlID&"]") if @error=1 then msgbox(0, "ControlGetText", "FAILURE. @error="&@error) ;failure returns "" and @error=1 Exit EndIf msgbox (0, "ControlGetText", "SUCCESS. @error="&@error &@CRLF& "$text="&$text) ;success returns string and @error=0 You'll see that the ControlGetText operation runs without error, however it does not capture any text from the control. If you explore the other controls in this one window, you'll find mixed results across the board. Neither the temps nor voltages can be read, while the log field and some other elements can be read. Even when you read the text from the whole window, those elements are not included in the visible nor hidden texts.
I have run into this issue many times in the past- inconsistencies in the ability of autoit to interact with certain controls. What is it which makes this text different than any other readable texts? Is there an alternate method of reading the text in the window/control which could work? Any and all info to help me solve this mystery and satisfy my curiosity would be greatly appreciated.
Thanks -Rob C
PS: Running Autoit v184.108.40.206 on Win7 Ultimate x64
I'm trying to vertically center text in label controls, but no way. The search on the forum returns no result, or I don't search the right way
When I insert a button and a label of same size close to each other, the text is centered on the button, but top aligned on the label, or edit. Which doesn't look really aesthetic
Any idea is welcome
Thanks in advance,
Hello my friends
I am a totally blind young man
for easier to read books and articles Among the blind
i has programmed a tool
This tool converts text to audio with the possibility to save it into a wav or mp3 file
It is also compatible with all persons, whether blind or ordinary
I have completed the work of this tool and want to take your opinion
i Especially published here for anyone looking about how to convert text to speech, I will put this tool open source for you
I want to know what your think about it
and if it need any other additions?
This tool converts texts to audio using sapi 5 voices
so i was also puted a hot keys to control the tool
Now I put this project to you for public benefit and I am ready to answer any question.
I am an Arab youth from Algeria
I do not mastered English very well
So I apologize to you if there are written mistakes
With my greetings and best wishes
My texts to audio converter.zip
Good morning guys
I was trying to not open another post, writing here my little issue, but seems that no one cares about, and so, I'm opening another post
What I'm trying to do, is detect the event close sent from the virtual keyboard.
Because, I have an application which, when I set the focus on a textbox, if the virtual keyboard does not exist, then it is created, else, it's not created
But, everytime I try to close the virtual keyboard, the focus remains on the textbox, and another $EN_FOCUS event it's launched and detected from my WM_COMMAND, and so, the virtual keyboard is opened again.
How can I solve this little "issue"?
I was trying to detect the event sent from the virtual keyboard, storing the handle of it in a variable, and setting:
GUISetOnEvent($GUI_EVENT_CLOSE, "CloseVK", $hVirtualKeyboard) without any result.
Can someone please help me?
Here I'd like to see @Melba23, @water, @Danyfirex...
Is there any way to launch an application once I receive an email.
I have an executable created in autoit and I am running it regularly on daily basis using task scheduler on windows.
And sometimes I am running it again manually if someone asks to.
Is there anyway to configure an email so that when I send a mail to that particular email ID then it should launch that exe directly?