ScriptSpot home

Forum topic · General Scripting

Dialog Positions

By bob---cat · 2025-03-27

Description

Hey guys,

I am trying to write a script for a rollout/createDialog, that docks to the rendering dialog box.
So that poeple can select presets and other tools before hitting render.

My idea was to create a callback for when the render dialog is opened and then run the rollout script, which would find the position of the render dialog and position itself next to it.

I found this, but it seems to only work for MS dialogs.

GetDialogPos

Does anyone know how to do this?

Thanks

Comments (1)
Simon Bourgeois

Hi,

Not sure if it is the best way to do it but you can use this:


(
	local HWNDArr = windows.getChildrenHWND 0
	local RenderHWND
	for w in HWNDArr where MatchPattern w[5] pattern:"*Render Setup*" and w[6]==(windows.getMAXHWND()) do RenderHWND = w[1]
	local RenderHWNDPos
	if RenderHWND != undefined do RenderHWNDPos = windows.getWindowPos RenderHWND
	print RenderHWNDPos
)