Old 29th May 2008, 19:37   #1
UncleSmokinJoe
Junior Member
 
Join Date: May 2008
Location: Newport, KY
Posts: 3
using FindWindow when multiple windows have the same title

Hey all,

I am trying to use FindWindow, GetDlgItem, and SendMessage to automatically answer a question that a program prompts for (the program is executed from the NSIS script). The problem is that there are two windows with the same title open at the same time, and FindWindow is returning the handle of the window that has no controls on it. Does anyone know how I might get the handle of the other window with the same title?

Thanks for your help.

uncle SJ
UncleSmokinJoe is offline   Reply With Quote
Old 29th May 2008, 20:52   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
call FindWindow again with the first handle you got as childafter, or use EnumWindows with the system plugin (it has a sample in its readme)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th May 2008, 16:37   #3
UncleSmokinJoe
Junior Member
 
Join Date: May 2008
Location: Newport, KY
Posts: 3
it worked!

Anders, you are indeed a major dude. I used the first thing you suggested and eventually got it to work. Many thanks!
UncleSmokinJoe is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump