Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here





First off, I'm new to VBScript.

I'm would like to be able to call SendMessage(handle, WM_GETTEXT, wParam, lParam)

However, lParam is defined as a pointer to a text buffer where the resulting text is placed.  Am I correct in thinking that there is no way to do this in VBScript?


RE: SendMessage(WM_GETTEXT)

Why don't you use CDOSYS?  Comes with Win2k and above.

I believe the SendMessage() is a Win32 API call..

Just a thought.  Search here for "CDOSYS" or same on one of the bigger net search sites...  Couple that with vbscript and you should find more than enough examples.


RE: SendMessage(WM_GETTEXT)

CDO is email related.  Windows messages are something else entirely.  See http://www.developerfusion.com/show/34/3/ for example.

But it is true that Windows Script engines (VBScript, JScript) and common script hosts (WSH, IE) do not offer any interface to Windows APIs.

You'd need to write an ActiveX component to perform this action, then invole it and call the appropriate method from your script.  VB5CCE or better can be used for this.

RE: SendMessage(WM_GETTEXT)


Where I wrote "invole" I meant "invoke" - and should have said "instantiate" in the first place.  Sorry.

RE: SendMessage(WM_GETTEXT)


I haven't tried this but you might try using the GetRef function in combination with the Rundll32.exe.  From what I understand GetRef will return the address of an object, which should give you the pointer.  Then you might be able to use the pointer to call rundll32 with sendmessage as a parameter.  I have never even tried to experiment with this stuff.

Good Luck,


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close