Jump to content
Sign in to follow this  
hmsSurprise

Send vs ControlSend vs ControlSetText

Recommended Posts

hmsSurprise

I was automating the installation of MySQL and was trying to change the text in the RichEdit20W control listed below. Since there were multiple controls listed on the page I thought I should use ControlSend or ControlSetText as they are control-centric vs Send which is Window-centric but it would not work. Return values and @error were zero. After whizzing in the wind for a couple of hours I finally relented and tried Send, which worked like a hose. Seems unusual to me that Send would be the correct solution.

Your thoughts and wisdom?

Thanks,

jh

WinGetClassList($title,"") results:

RichEdit20W

Button

Button

Static

ComboBox

Button

Button

SysListView32

Static

Static

Static

Static

Static

Static

,

Share this post


Link to post
Share on other sites
MHz

Up to you, but I avoid Send() and MouseClick() like the plague. :shocked:

Share this post


Link to post
Share on other sites
Zedna

As MHz said Better way is to use ControlSetText() or ControlSend().

But if it's not working then use Send() and have no fear. You just must take your window Active!

I always use ControlSetText() or ControlSend() too.

But with several applications I have BIG problems, so there I used Send()

Problems are with nonstandard controls, for example PowerBuilder has it's special control 'PBdw801'

which holds some internal edit boxes, labels etc.

As I discovered PowerBuilder uses one helper Edit control and places it over his PBdw801 to place where is focus

and internally copies text between this Edit and PBdw801.

Other problems are with national keyboard where ControlSend() sometimes sends bad characters for key

which may have differrent sense at english/national keyboard.

So sometimes Send() is the only one working solution.

Share this post


Link to post
Share on other sites
MHz

But with several applications I have BIG problems, so there I used Send()

Yes, sometimes you have to. If it is the only way. The odds of installing with success drops a lot with not using Control* functions. If the author make's the the program that hard to install then you should send them an email to complain. :shocked: Edited by MHz

Share this post


Link to post
Share on other sites
hmsSurprise

Yes, sometimes you have to. If it is the only way. The odds of installing with success drops a lot with not using Control* functions. If the author make's the the program that hard to install then you should send them an email to complain. :shocked:

Dear MySQL,

I hate your shareware...

...

Umm, maybe I better polish this a bit. ;^)

Share this post


Link to post
Share on other sites
MHz

So they use an Installshield, yes? MSI or exe based?

Edit:

Typo fix

See if this will help you. If it is purely exe, then you can record the install and play it back. If it is MSI then you can do same as any other MSI.

http://uawiki.org/CMenu/sendtoa3x.html

Edited by MHz

Share this post


Link to post
Share on other sites
hmsSurprise

So they use an Installshield, yes? MSI or exe based?

Edit:

Typo fix

See if this will help you. If it is purely exe, then you can record the install and play it back. If it is MSI then you can do same as any other MSI.

http://uawiki.org/CMenu/sendtoa3x.html

Not sure if exe or msi, I execute setup in download dir to run it. Based on discussions that I looked at regarding silent installations, I believe it is msi.

I got past that problem but will certainly use sendtoa3x on the next troublesome pane ( or is it pain?).

jh

Share this post


Link to post
Share on other sites
MHz

If you type %temp% in the run box amd then run your installer, then see what appears in your temp folder. It may appear in the root or a subfolder, but an msi is easy to pick, especially if it appears in task manager as msiexec. Signs will tell you what you need to do.

Edited by MHz

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  

×