Jump to content

Recommended Posts

Posted (edited)

I think I'm missing the boat here, but how do you target a label to a specific window handle? I see comparable commands like

_GUICtrlButton_Create($hWnd, $sText, $iX, $iY, $iWidth, $iHeight[, $iStyle = -1[, $iExStyle = -1]])

But I'm not seeing one like that for a label. I know you can create labels right after the GUICreate and it will bind itself to that parent window, but I need the ability to actually target the window handle.

Anyone know if that can be done? Probably something stupid I've overlooked.

Edited by Cyri
Posted

Why would it matter if you create the label after the GUICreate or with a window handle? Do you want to create the label on/in your scripts GUI or on an external application?

Yes, it's on/in my scripts GUI. However, I'm doing multiple GUICreate (not child) commands in my script. Is that not advisable? I create a seperate GUI for each screen and then show/hide them as the user flows through.

Posted (edited)

I haven't worked much with multiple gui's, so I can't say if they are advisable or not, but you can use GUISwitch() to switch the "active" gui and then use the normal funcs.

Many of the GUI specific functions work on the "current" window - this is usually the last window created with GUICreate. This function allows you to make another window "current". That's does not mean that the referenced window will become active. You have to use WinActivate.

Edited by AdmiralAlkex
Posted

I haven't worked much with multiple gui's, so I can't say if they are advisable or not, but you can use GUISwitch() to switch the "active" gui and then use the normal funcs.

Sweet that looks like what I want.

Posted

I haven't worked much with multiple gui's, so I can't say if they are advisable or not, but you can use GUISwitch() to switch the "active" gui and then use the normal funcs.

That did the trick. I can't believe I hadn't run into that command before. Thank you! :)

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
×
×
  • Create New...