IDE Scripting to change Architecture

I can’t seem to figure out how to change architecture using an IDE script.

I want to create two scripts;
#1 Will set the OS X Architecture to x86 32-Bit and then “RunApp”.
#2 Will set the OS X Architecture to x86 64-Bit and then “BuildMac”.

Is there a way, I’ve tried the usual suspects…

I don’t use much IDE scripting, but you can do “call BuildApp(16)” from an IDE script to build 64 bit MacOS regardless of the build setting. Keep the setting to 32-bit in the build settings and RunApp will always run in 32bit.
BuildApp(7) will do a 32bit MacOS build.

I don’t see a way to actually change the settings themselves from a script… but then I really don’t know IDE scripting that well.

Thanks, that will do the job.
I created a script using the following code

call BuildApp( 16, false )

This then builds a 64-Bit version while leaving 32-bit for debugging, and with the inclusion of the already present App Wrapper script, App Wrapper then kicks in and does it’s thing.

I see that Xojo auto assigns the script the key combo command-option-1, Would be great if I could replace this with command-b. Or alternatively create a “Build” script where I can specify which architecture is used when the application is building.

Hmm… you can go into system preferences and in the keyboard pane, you’ll see a “shortcuts” tab. Select it. Then select “app shortcuts”. Click the plus sign. For application, select “other…” and navigate to For the menu name, enter “File->IDE Scripts->BuildMac64.xojo_script” or whatever you’ve named it. Assign the key combo to Command-B. Good to go!