this is a little overkill, but it was a pain to get working as a newb.. so thought I’d share
You can just edit the things in the ---------------------------------'s to do whatever..
Generic Toggleable floater dialog, (Origionally made because the display floater is a bit too bulky..) saves where you leave it too in the 3dsmax.ini file (You can remove that if you want just by commenting or deleting the on vsaiDemoRoll moved and the on vsaiDemoRoll open functions.
--------------------------------------------------------------------------------------
-- Generic Starting place for a Floater script..
-- Dave Buchhofer -- [email]dbuchhofer@gmail.com[/email]
--------------------------------------------------------------------------------------
macroScript DemoFloater category:"DVBTools"
(
--------------------------------------------------------------------------------------
-- Rollout definitions..
--------------------------------------------------------------------------------------
rollout vsaiDemoRoll "ToggleAble Floater"
(
---- Buttons and whatnot definition..
label lab01 "A Toggle-able Floater!"
label lab02 "With Position Save."
button but01 "Ok!"
checkbox cb01 "CheckBox!"
---- Events from buttons..
on but01 pressed do (
--Put what you want to do here..
destroydialog vsaiDemoRoll
)
on cb01 changed theState do (
--Put what you want to do here..
destroydialog vsaiDemoRoll
)
----
--------------------------------------------------------------------------------------
-- Position Saves and Reloads..
--------------------------------------------------------------------------------------
on vsaiDemoRoll moved loc do
(
vsaifloaterpos = [ loc.x , loc.y ]
setIniSetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX" (vsaifloaterpos.x as string)
setIniSetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosY" (vsaifloaterpos.y as string)
)
on vsaiDemoRoll open do
(
if (((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX") as float) != "") then
(
setdialogpos vsaiDemoRoll [ ((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX") as float),
((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosY") as float)]
)
)
--------------------------------------------------------------------------------------
) -- end rollout
--------------------------------------------------------------------------------------
-- Generate and Destroy dialog funcs..
--------------------------------------------------------------------------------------
fn generateVsaiDialog =
(
createdialog vsaiDemoRoll width:116 pos:[ ((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosX") as float),
((getinisetting "C:3dsmax63dsmax.ini" "vsaiFloater" "vsaiDisplayFloaterPosY") as float)]
)
fn killVsaiDialog =
(
destroydialog vsaiDemoRoll
--Works better in a function for some reason.
)
if vsaiDemoRoll.indialog == true then killVsaiDialog() else generateVsaiDialog()
)-- end macroscript