patcher attributes in js

Werner Funk's icon

Hi,

I would like to define/change patcher attributes such as "show grid on open", "snap to grid on open" by some js code.
This could be useful when opening Max4 patches in Max6/7.

Has anyone js code doing this, possibly in recursive mode for nested subpatchers?

“please do all my patching for me”, this is not what I want.

Only, if somebody could pilot me into a path to correct syntax,
this would be great. Thanks.