Thanks Hussein, I wish I could upgrade to the newest version. However, it may take another year or more before we can. In the meantime I guess I won't be able to do such differentiation in xxe-2.11. I was hoping that the <pass> would work but it always "pass" the command "run" no matter what is the parameter. Perhaps I should try to 'invent' a command only valid for Mac so that I can use <pass>. Also, the <pass> element act more like just a "if" and not like "if else" - I am not sure if there is such a thing as <if><else> in xxe.
Thanks for your reply. I will certainly push to upgrade our process. Jocelyn Raymond > -----Original Message----- > From: Hussein Shafie [mailto:hussein at xmlmind.com] > Sent: Wednesday, June 18, 2008 2:42 AM > To: Raymond, Jocelyn > Cc: xmleditor-support at xmlmind.com > Subject: Re: [XXE] Command for Mac and Win > > Raymond, Jocelyn wrote: > > How can I execute a "run" or "start" command based on the > OS (Mac or > > Win)? In other word, if xxe is running on a Mac, when trying to > > execute a <command ...> > > <macro> > > <sequence> > > <command name="run" parameter="if Mac use this else > use that"/> > > </sequence> > > </macro> > > </command> > > > > I tried playing with <pass> but it works only for one OS at a time > > (depending on the test). I am using xxe-2.11 (sorry, old > version but > > we paid for it and our process currently only works with > this version > > - no time for upgrading our process) The main problem is > that whenever > > I use "run", the relative path is different for Mac and Win. I am > > trying to "run" a ANT target. Also, I > > *must* put my application inside > <XML-Mind-Install>/addon/config and > > not into <username>/.xxe2/config/. My ant script is located inside > > addon/config/<myapp>/xml/... > > > > I was hoping to do something like: > > <command name="run" parameter="../addon/config/lib/ant/bin/ant > > -buildfile ../addon/config/<myapp>/xml/build.xml targetone"/> > > > > which would work for both platform. However, the relative path for > > the Mac is always: /Applications I also tried all the xxe variable > > such as %{D} and %{C} with no success. > > Currently the solution of this problem is fairly simple. Example: > > --- > <command name="untabify"> > <macro> > <sequence> > <choice> > <command name="run" > parameter='[Windows] C:\cygwin\bin\expand "%F"'/> > <command name="run" > parameter='[Unix] expand "%F"' /> > </choice> > <command name="paste" parameter="toOrInto %_" /> > </sequence> > </macro> > </command> > > <binding> > <keyPressed code="ESCAPE" /> > <charTyped char="8" /> > <command name="untabify" /> > </binding> > --- > > Notice [1] the use of <choice> [2] The "[Windows]" and "[Unix]" > prefixing the commands. A "[Mac]" option is available too, see: > http://www.xmlmind.com/xmleditor/_distrib/doc/commands/run.html > > However this will *not* work in XXE v2.11 (July 11, 2005) as > the platform option has been added to command run in XXE > v3.1.0 (January 30, 2006). See > http://www.xmlmind.com/xmleditor/changes.html > > > >

