You have three problems. The first problem is that you are incorrectly getting the material though slate, as your code is complaining that the actual material is undefined. The second problem is that you are relying on Slate to access materials in the first place, which you shouldn't do. If you know the name of your material, here is a script that will give you access to that material without relying on Slate or the compact material editor. All you have to do is replace the 'mat_name' variable in the first line with the name of your material.
Then once you run it, you can access the material properties using 'mat', for example 'mat.name'.
matName = "sdr_test"
matArrNum = 0
allSceneMaterials = for m in SceneMaterials collect m
for i = 1 to allSceneMaterials.count do
(
if allSceneMaterials[i].name == matName do matArrNum = i
)
mat = allSceneMaterials[matArrNum]
The third problem is that you are assigning too many variables as the same data. You need to break it down a little:
test = CoronaBitmap()
test.filename = "\\test\test.jpg"
mat.texmapDiffuse.texmaps[1] = test
[Edit]
I must add that this script relies on a material being applied to at least one object in your scene. I know you are just wanting to access an unconnected map node in Max, but it makes things much easier if you simply assigned this material to a hidden box, or some other simple object, then simply use an instance of the map used in the material any where you like.