That might be true in this script, but not in general.
Not sure where and when exactly this happens, however in some situations type as string returns raw syntax. Had a hard time figuring that out.
@cgrunenberg, I just checked the new hint about the type as string issue …
… in the dictionary …
Note: In compiled menu/toolbar scripts you might have to use a string representation of the type for comparisons.
… to show @BLUEFROG that it’s a known issue - but it’s not mentioned ![]()
Wouldn’t it make sense to add “and its raw syntax”? Without it users get only half of the solution …
… I think.