Tagged 'General Scripting'

detect unicode file names and rename them!

How to DETECT non-english characters inside file names and rename them???

Please help!

Optimizing code

Hello
I am trying to optimize my code. Need to select a object class in a specific layer.
I am working with code that consists of two stages:
1: Selecting all objects in the layer.
2: Selecting splines from selected objects.

(
local allNodes = #(), theNodes = #()
for n in selection do (n.layer.nodes &theNodes ; join allNodes theNodes)
select allNodes
select(for obj in selection where classof obj.baseObject==line collect obj)
)

I am looking for a way to exclude the first part while keeping the result.
Any ideas on how to do this? Any help appreciated.

Maxscript dotnet

Hi Guys,

I'm working on a script which uses a dotnet form for the UI. One of the elements is a ListView. When trying to get it to select one of the items I get an error. I'm basing a lot of it around:
http://scriptattack.com/snippets/snippets.html

Although I have to call functions like this:

fn Shot_lb_Get Shot_lb evnt =
(
hit=(Shot_lb.HitTest (dotNetObject "System.Drawing.Point" arg.x arg.y))
row=hit.item.Index
)
dotnet.addEventHandler Shot_lb "MouseUp" Shot_lb_Get

Does anyone have an idea why it fails?

John

AddTarget - Float scripts

Hello,

How can i use the AddTarget option in float scripts? I dont't want to write a new script to solve this problem, but where i have to write this "AddTarget" to make it works, and what i have to write punctually?...

I searched for solution on scriptspot and cgtalk, but i didn't found what i want, only separated scripts which solve this, i think (hope) it could works without any other scripts...

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]

2 entries in a single line in listview!

how do you think, is it possible to insert in listview inside a single line 2 entries like here? http://www.scriptspot.com/files/script_0.jpg
so that I could show text like in attached picture:

I didn't find any info about this here
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=fil...

Help with a simple renaming script

Lorem ipsum dolor Lorem ipsum dolor Lorem ipsum dolor Lorem ipsum dolor Lorem ipsum dolor

removing floating faces - Maxscript

Do anybody know way to do this, How to remove from object faces which are not connected with base mesh - floating faces.
I need it for tool I'm working on but I'm running out of ideas.
Can anybody advice something?
Would be great to hear from You.

Select by name filter, update and Matte material global override

Hello everyone :)
I'm relatively new to Max scripting so I have few problems to solve which I didn't found on help or other forums.

I want my script to, when selecting geometry, filter only geometry when selecting by name (multiple objects - only Geometry - no helpers, cameras, shapes or so), the same thing with cameras. Also, to check those, I want them to print in the text box under the buttons and connect selected camera to render button.