how can i create shape button with script ?

hi
i would like to press button create- spline - recangle button with hwnd way

i modified sample code but error

what problem ?

fn pressButton hwnd: name:"OK" =
(
if hwnd == unsupplied do hwnd = DialogMonitorOPS.GetWindowHandle()
UIAccessor.PressButtonByName hwnd name
)

hwnd = windows.getchildhwnd #max "Create Shape"

DialogMonitorOPS.unRegisterNotification id:#rectangle
DialogMonitorOPS.RegisterNotification pressButton id:#rectangle
DialogMonitorOPS.Enabled = on
UIAccessor.PressButton hwnd[1]
DialogMonitorOPS.unRegisterNotification id:#rectangle
DialogMonitorOPS.Enabled = off

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dussla's picture

wow wow very simple

wow wow
very thank you ~~~
very simple

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.