Jump to content

GUICtrlSnedMsg


 Share

Recommended Posts

Can GUICtrlSendMsg (and ny other GUI function) only be used to send messages to controls on a form that is built with GUICreate or can you send messages to any control on any form?

For example, I have an application open with an editbox, if I know the handle of that editbox (of an external form), can I send messages to it?

I realize that there is the ControlCommand function, but GUICtrlSendMsg is a lot more powerful and it would be useful for our project.

Thanks for any insight.

Link to comment
Share on other sites

So I take it that you can't use it to send messages to other windows, only ones created by the script itself?

Not familiar with call DLLS from AutoIT, was hoping I wouldn't have to...

<{POST_SNAPBACK}>

Ok, I got an external DLL to work...

$result = DllCall("user32.dll", "int", "SendMessage", "hwnd", $hnd, "int", $LB_FINDSTRING, "int", 0, "str", "somestring")

Getting closer... Ok, this will look for the "somestring" starting at the beginning of the list box, at the beginning of each line. What I need is to look for "somestring" but it may not start at the beginning of each line.

For example, lets say I'm looking for the word "autoit". In my listbox, it may look something like this..

line item1

line item2

love autoit!

line item4

line item5

I need to be able to search for the word autoit and return it's location even though it may not come at the beginning of the line. Keeping in mind I'd rather not walk through each line item and was hoping someone may know of another way to do it.

Any ideas?

Edited by Crestline
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...