ScriptSpot

Forum topic · General Scripting

Position of dialog

By remykonings · 2019-08-14

Description

Hi,

I have a macros script which creates a dialog at position 0 0 after running it.

I'm searching for a way to set the position of that macroscript to 100 100 from another script. So it overrides the position of the macroscript because i can't adjust that (due to others who work with it)

Thank you :-)

---
This is the call to the macroscript:
macros.run "bf tools" "bfWorkflow"

Comments (3)

.

jahman · 2019-08-14

it would be better to rewrite the hardcoded part of the macro to use user local settings
otherwise use SetDialogPos

.

remykonings · 2019-08-14

Right I understand. I would rather change it in the macro but i'm not allowed to change the position as others in my company are used to it like that, while I like to change the position just for myself.

So how would this script look like using SetDialogPos in regard to my macroscript.
--this macroscript is loaded from from a network toolbar.

(
macros.run "bf tools" "bfWorkflow"
SetDialogPos 100 400
)

Not sure how to use the to be honest.

.

jahman · 2019-08-14

something like this
SetDialogPos <variable that holds rollout> [ x_coord, y_coord ]


rollout MyRoll
(
   ...
   ...

)
CreateDialog MyRoll pos:[0,0]

for this example it would be
SetDialogPos MyRoll [ 100, 100 ]