What do you do with IDE Scripting?

I’ve been automating some builds, but I am interested in hearing what others do with IDE scripting!

my IDE script set the content, change the name for window exe file and the mac app folder. the create build and then change the constant to something else and repeat what i did earlier.

Our build scripts copy frameworks, set plist settings, start AppWrapper, start DMGCanvas and puts everything in one folder for distribution.

Here is something else besides building that I now do, I was hoping someone else does the same thing or would want to contribute to the project I created: https://forum.xojo.com/1986-help-with-code-formatter-already-works

have no idea IDE Scripting can be so powerful

Many applications I write are derived from a basic structure built in the time so I use IDE script to

  • set the main parameters of the application,
  • set the “editing windows” basic elements so then I have to code only the real code (ok now with XOJO it not works anymore),
  • create the DMG for OSX, scripts for Innosetup and the manifest for the automatic update feature of these applications.

If you do something repeatedly maybe it’s time to automate it

With Xojo, unfortunately, things to automate are increased (seen many clicks you need to do to make every action) but the the active instructions are decreased …

Emblematic case of the command ChangeDeclaration that worked well in most cases except in the case of properties (if you used to declare via script “i as integer” you found written at the end “i as the integerAs”), but given the amount of work I spared, this was a minor problem .
Now the problem is gone, the command is noop.

In my case I also load most resource files. I like them to be ordered in folders and they come from a shared directory with the graphic designers, so they can tweak icons as they see fit and they’ll be included in new compiles. In this I have image files, help HTML files, font files and even color schemes. I stopped including actual image files in the projects long ago. I load them from the resources directories as needed (and can pre-cache what deserves it upon application launch).

Here’s a hint - in the Fall, we added an IDE Script command that lets you display a modal MessageDialog. This allows your IDE Scripts to ask questions, to which your scripts can do different things depending on the button you click!

Yes, very useful. I use it in my “first setup routines”

Greg, is there some chances that “changeDeclaration” will return to work again?

Since the events are created via a modal dialog, is there some idea about how create them via IDE script?

Some ideas to complete the IDE script:

  • add an external component (like: addComponent pathOfComponent as string, asExternal boolean=false)
    Since release 12.1 the external component path as saved as absolute path, so I can’t copy a project folder to another location without relocate all external item and for many projects it’s a very long work (before 12.1 the path were relative and all was automatic). So with this command I can set the right version item for a new project.

  • make an external component to internal (with an internal no operation for non embeddable items like images and so on)
    To consolidate a project and so separate the used framework and freely move project folder in some other place.

  • A progress window, so for long tasks I can see that something is going on

  • DebugLog, so while writing the script I can check the current values without the use of an old style print.

With Xojo the productivity is slower: Ide script it’s a solution to regain it at least in some tasks

+1 on DebugLog, I’ve created a feature request for it: <https://xojo.com/issue/27378>