How to batch convert Projects into Text Format?

Hi,

how could I convert 2000 Xojo projects from binary to text format?

Greetings
Christian

Arbed can’t write new text projects.

No :frowning:

The IDE has some nice features to do so:

  1. Open existing project
  2. Save as
    Just stop thinking and repeat 2000 times, which is 2 projects per minute is 2 days. If you take the weekend nobody will notify any production loss.

Make an app like this, on mac

  1. launch the binary project
  2. send IDE Script DoCommand(“SaveFileAs”) to display the dialog
  3. use AppleScripts to get the position and size of the window
  4. use those coordinates to warp the mouse so it changes the format menu and clicks save
  5. wait a bit and repeat

I use this to automate clicking certain parts of the IDE, this is my applescript to get size

on run {} tell application "System Events" get the size of window 1 of process "Xojo" end tell end run

Maybe there’s better ways to get the Window metrics, whatever you have to do. Really it’s just about automating the mouse.

[quote=257933:@Joost Rongen]The IDE has some nice features to do so:

  1. Open existing project
  2. Save as
    Just stop thinking and repeat 2000 times, which is 2 projects per minute is 2 days. If you take the weekend nobody will notify any production loss.[/quote]

Just use Keyboard Maestro:slight_smile:

If Keyboard Maestro works as slow as it’s website does, it will take even longer.
Think it’s not an option since he has to find all his projects, which is difficult to be done by Keyboard Maestro.

I would prefer Xojo to simply add a SaveAs command to the IDE Scripting:
<https://xojo.com/issue/11908>

I think it would be worth an engineer spend an hour on that topic.

Its more than an hour which is why it hasn’t moved

I expected a method is called from the save menu command which takes a folderitem as destination, the type and writes project there.

Well, I don’t know what the IDE code looks like and probably it has 20 years of development behind.
But without an IDE Scripting solution I can’t help Sascha to get my examples to GitHub.

and i don’t expect Thomas to spend days on getting Arbed to convert to text format.

If I can do it I know you can do it Christian :slight_smile:

Would XML instead of text work? Arbed can convert to XML.

In AppleScript you can use the GUI scripting for selecting Cmd-Shift-S from the menu.

Remember, this must be a process which can run every few months, without any dialogs or problems and for 2000 projects.

I would prefer to not use GUI scripting for this.

If you switch to text format for your examples, isn’t it a one time conversion?

who says I switch?

You, by putting your examples on github.
Unless you just want to use github for hosting examples and don’t plan on merging pull requests. But even then, it’s less hassle to stay in sync instead of converting and updating everything once every few months.

if I make the github repository the main place for examples, I need to automate converting them back for download.