How to get the ReformatCode.xojo_script working

I disagree. I rely on ReformatCode.xojo_script to standardise my code as I move away from a line, so that I can later perform a Search and Replace accurately and completely. For me it is critical.

@Craig_Boyd how did you download the script ?
I just came along a weird thing on my macbook the script does not work !

after opening the script, inside is the code for an html page ! not the script !
I followed @Paul_Lefebvre advice to right-clic the script and save as…
you must clic on the script first on github, then click the download button

just look inside the script you downloaded if it is html code or xojo code…

@Jean-Yves_Pochez Thanks for this tidbit. I will try that later today.
The way I have done it the last couple of times is to click on the “copy raw” button on the website and paste it into an empty text file.

@David_Cox I completely understand where you are coming from there. I intentionally prefaced that quote with “for me” knowing full well that there are many, like yourself, here who depend on this functionality of the IDE. I have only just recently discovered (rediscovered?) it.
I am about 99% sure that I am doing something wrong here or that there is something about my environment that I/we have not hit upon yet that is the source of the issue.
I believe that if this functionality was genuinely broken many others would be struggling with this and it would have received attention long before I posted about it.

With that in mind I did not think it was important, but just so we are all clear: I am running Windows 11 in VirtualBox on a Linux host.

I’m running the latest test version and it’s working again, so thanks to Xojo!

?

Good for you! :slight_smile:

No worry @Craig_Boyd, i’m using it on Windows 10 with Xojo 2025 1.1 and it’s working here.
I did it the following way:

  1. I opened the GitHub Page: ReformatCode/MacroSample.xojo_xml_code at main · paullefebvre/ReformatCode · GitHub
  2. I downloaded the file with this Button:


4. Then i placed the File in this Folder
5.

6. I restarted the Xojo IDE

Thanks @Sascha_S
I will give this a shot during lunch today.

Well, as it turns out I was right! I am doing something boneheaded! :laughing:

Some how, some way copy and pasting the script into an empty text file was causing some kind of problem.

It is working now. Thanks to everyone for their help.
This is truly a great community.

1 Like