Jump to content
Sign in to follow this  
hmsSurprise

Unable to set text

Recommended Posts

hmsSurprise

I am running MySQL 4.1 setup and on the 2nd pane I select custom setup, on the 3rd pane I click "Change...". Pane 3a (Change Current Destination Folder) now pops up and has a text box whose ClassName is 'RichEdit20W1'. (I found the ClassName by using the ControlGetFocus while loop trick that JdeB taught me, so it's gotta be right.)

ControlFocus($title, $text, 'RichEdit20W1') returns a 1.

So far, so good.

The immediately following ControlGetFocus($title, $text) returns a null string and @error = 0. This is puzzling since I found it early with ControlGetFocus. I suspect that my problem arises from two panes being open even tho I had set the focus. If I check focus with ControlGetFocus('','') it returns 'Edit1', which is not on either of the MySQL setup panes.

All of this came about because I could not get ControlSend and ControlSetText to work.

Any ideas?

Thanks,

jh

Share this post


Link to post
Share on other sites
PsaltyDS

Any chance that's the ClassNameNN of the whole window, and not just the edit box you are interested in? I don't know that's the case, but I think the first part of that name "RichEdit20", just means it is generated by the RichEdit v.2.0 (or 3.0 - same name) .dll. That leaves the "W1" as the control descriptor, which hints at "Window 1", vice "Edit1".

:shocked:


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

Share this post


Link to post
Share on other sites
hmsSurprise

Any chance that's the ClassNameNN of the whole window, and not just the edit box you are interested in? I don't know that's the case, but I think the first part of that name "RichEdit20", just means it is generated by the RichEdit v.2.0 (or 3.0 - same name) .dll. That leaves the "W1" as the control descriptor, which hints at "Window 1", vice "Edit1".

:shocked:

Ah, now we are getting somewhere. Right you are. How empathic you are!

Thank you sir. I was using the control focus tool but darned it doesn't give that name for the whole window. Tried to narrow it's scope by supplying title and text but to no avail. Window Info gives the same name. Control ID is 301 but that does not help either. Better look at classes again...

jh

Share this post


Link to post
Share on other sites
hmsSurprise

My classes are:

RichEdit20W

Button

Button

Static

ComboBox

Button

Button

SysListView32

Static

Static

Static

Static

Static

Static

I know the 4 buttons and the combo and the SysLIstView32. But I wouldn't guess it is a static object.

Share this post


Link to post
Share on other sites
hmsSurprise

Was able to set focus on Static1 - Static4 but neither ControlSend or ControlSetText would write to these. only choice with RichEdit20W was 1.

About tried out here....

jh

Share this post


Link to post
Share on other sites
hmsSurprise

I never would have thought it would work and I guess that is why I have just now tried as a last resort to use Send. It worked but I thought it a poor choice with so many controls present.

Oh, well. Another aftenoon shot to heck.

jh

PS - It was important to set the focus. Having it elsewhere or just not setting it caused strange results.

Edited by hmsSurprise

Share this post


Link to post
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
Sign in to follow this  

×