It's possible, but not straightforward.
First of all, Wine still uses X11 for windowing and 2D graphics, even on the Mac. CrossOver has an X server built into it, and CrossOver's Wine uses CrossOver's X server and X libraries. It doesn't work with Apple's X11.
So, CrossOver has to be running in order to use its Wine (at least, the GUI parts of Wine).
CrossOver sets up several environment variables for the processes it launches. Several of these are used to let Wine find CrossOver's X11 libraries and connect to the server. CrossOver picks a display number (DISPLAY) dynamically at startup so that it doesn't conflict with other instances of CrossOver (or CrossOver Games) that might be running, including by other user accounts which might be switched out by Fast User Switching. However, once CrossOver picks a display number that nobody else is using, it remembers it and tries to use that same one on next launch. In theory, then, CrossOver should use a relatively stable display number.
CrossOver.app can be relocated, which is a very unusual thing for an X11 environment. (Most are tied to a very specific directly, like /usr/X11, and break if you move them.) We have hacked on the X11 libraries to allow them to work from any location, but some of the libraries need a hint in the form of environment variables as to the actual location.
Try this: from CrossOver's Programs menu, select Run Command. Toggle open the Debug Options section of the Run Command dialog. Click on Open Shell. That will open a new Terminal window and issue a number of commands to configure the shell for accessing CrossOver's Wine. (The first window opened that way can sometimes be misconfigured due to timing bugs in the scripting frameworks. You might want to close the first window and click Open Shell a second time.)
The relevant variables for relocatable X11 are:
FONT_ENCODINGS_DIRECTORY
FONTCONFIG_ROOT
FONTCONFIG_PATH
DYLD_FALLBACK_LIBRARY_PATH
They include the path to CrossOver.app. So long as you don't move CrossOver.app, you can grab the values for those variables and set them in your shell script. The PATH also includes the path to CrossOver.app, and you can either copy that or just use absolute paths to the tools.
To have your script work with a bottle other than the default, you can either set CX_BOTTLE or pass "--bottle <bottle name>" as an option to the "wine" command.
You probably don't need CX_ROOT or CX_BOTTLE_PATH. They are used for some of our non-Wine tools (e.g. cxbottle) and those tools can usually compute the values. If you do plan to use those tools from your script, you'll have to set VERSIONER_PERL_PREFER_32_BIT=yes for Snow Leopard.
To set DISPLAY, you can just copy the value in use at any given time (as shown by Open Shell) and hope that it remains stable over time. If it changes, you'll have to update your script. Alternatively, you can read the most recently recorded display number from CrossOver's preferences using a command like:
defaults read com.codeweavers.CrossOver Display
Once you've got all those environment variables set, your scripts should work. (You'll probably see several other environment variables being set by the Open Shell feature. Most are just things which are copied incidentally from the environment that CrossOver.app inherited from launchd. You can ignore anything I didn't call out specifically, above.)
Good luck. 😊