I don’t think this can work on Mac at all in the current shape since paths seem to be a funny thing on the ZB OSX version (at least up to 4R8 which is the most recent one I’ve used). Just putting in a Mac filesystem path will not do in my experience.
You could try this:
Make a directory in your user folder to store the OBJ file in that does not contain spaces or special characters in the filename. Lets name it “/Users/alihh12/objs/” Put a valid obj file named “1.obj” there as well - in my experience the Mac version crashes instantly if you feed it a path that does not exist.
Then - I can’t test this atm but looking through my own mac-related ZStartup scripts - replace line 9 in your script with this one
[VarDef, Object1, “ZBRUSH_\objs\1.obj” ]
Make a symbolic link in your filesystem to the folder you just created in the ZBrush install directory. For that use Terminal(.app), “cd” to the ZB installation folder under /Applications and from that ZB directory use
ln -s /Users/alihh12/objs/ ./
That should create a symlink called “objs” right in the ZB folder. If you are unsure about what this does, check google to learn more or read this: https://www.howtogeek.com/297721/how-to-create-and-use-symbolic-links-aka-symlinks-on-a-mac/
Still from the ZB install directory use
ls -al
and check the output, you’ll see the symlink appearing in the file list like so objs@ -> /Users/alihh12/objs/ . In Finder it will look like a shortcut.
Now place your script where it’s supposed to be (and launch the application and see if it shakes out.