This command, used in IDE scripting…

Is there any way to set the default filename?
Alternately, is there a way within IDE scripting to change the name of the .xojo_binary_project file so that when “SaveFileAs” is called, the new name shows up?
Is there a “copy file” function within the IDE scripting? (I realize it could maybe be done with a shell command, but I’m always looking for the “easy way”) :slight_smile:

you dont get those choices

IDE scripting was intended to drive the IDE’s UI as IF someone was sitting at the desk doing it
And so it really isnt aimed at a lot of the tasks people ARE trying to beat it into submission to do (like writing code for them and saving as different formats etc)

Do Command records “actions” but all your going to get is the IDE reacting as if you had selected that command from the menu.
Thats ALL DoCommand does. Runs that action and the rest is up to you to deal with.
So you’ll still have to enter a new name, select a format, etc.

The IDE Script context would need a new “save file as” command added that would let you specify parameters like new file name new type etc in order to bypass that “SaveFileAs” dialog

You just made that silly thing (IDE scripting) WAY too powerful and really useful. It’s my favourite thing about the IDE.

I figured that was the answer, but I thought I’d check. Thanks, @npalardy !

I only added to it
It existed before I ever arrived
Given what folks try to do with it it really needs an overhaul to be able to manipulate all the items in a project better and more built ins to be able to do things like you suggesting - Save this project in a specific location with a new name etc

edit : knew I’d created such a case once upon a time
plus others
7749 IDEScript Editor needs undo
7916 IDE script ability to set a Constant Name
9060 need new ide script verbs that would allow a person to change the graphic of the App instance
23064 IDE scripting can’t get count of localized constant instances nor set the value for any of them
23919 cant set menubar or default window / web page using IDE scripting
29992 allow users to hook a specific build script to the Build button
39779 Add a special menu item under IDE Scripts > Open Script
44418 Add a XojoVersion function to IDE scripting
47773 add optimization level setting to ide scripting
55854 add / extend the Import command in IDE scripting
55987 Need some way to kill a running IDE script
62495 compatibility flags IDE script
63095 build automation should define “current step name” like CurrentMethodName for use in Scripts & external scripts

1 Like