ScriptSpot

Forum topic · General Scripting

Manually launch MSE file via Utilities tab > Maxscript > Utilities drop-down option

By infotech · 2012-06-11

Description

Hello ... I am fairly new to scripting.

I am currently accessing Maxscripts commands I've collected via the (Utilities tab > Maxscript > Utilities drop-down option) method.

I would also like to access various MSE scripts I've come across through this method. I know I can access some of these scripts via the toolbar or do a drag and drop unto the viewport. However, since I already have a number of scripts I am accessing through this method ... I would like to have them accessible from there as well.

How would I go about assigning the launch of an MSE script to a button action?

For instance ... this is what I am using to execute a Purge Empty layers from the Maxscript Utilities drop-down field:

-----------------------------------------------------

utility Del User Def Prop "Delete User Define Properties"
(
button btn1 "Delete User Defined Properties" pos:[25,19] width:180 height:25
label lbl1 "This script goes through all selected objects and strips away user define properties." pos:[23,57] width:200 height:70
on btn1 pressed do
(
setuserpropbuffer (getcurrentselection()) ""
messageBox "User Defined Properties have been cleared."
)
)

-----------------------------------------------------

What would be the appropriate command to launch an MSE file for the "on btn1 pressed do()" section?

Thanks in advance.

Comments (2)

fileIn

Swordslayer · 2012-06-12

If you only want to do that, use fileIn:

on btn1 pressed do
	fileIn "path\script.mse"

infotech · 2012-06-12

Thank you!!