Notifications
Clear all

[Closed] Wildcard help

I just recently started using wildcard characters in maxscript, and while as sometimes they work, other times they don’t, and I have no idea why.

For example, this works:


 getDirectories ((systemTools.getEnvVariable("USERPROFILE"))+"\Documents\3D-Coat*")
 

But this doesn’t:


 objfile = openFile ("file path goes here") mode:"r"
 tmp = ""
 myMeshName = ""
 while not eof objfile do (
 	if (tmp = readLine objfile) == "# object *" do
 		(myMeshName = tmp)
 	)
 

Why?

Could someone explain this seemingly very useful symbol to me?

1 Reply
 lo1

The * symbol has no special meaning in maxscript as a language. Some commands interpret it in some ways that are defined within that command.

Regarding your second example, you may want to look at the matchPattern method.