Jump to content

How to check syntax without AutoIt saving the script?


Go to solution Solved by c.haslam,

Recommended Posts

Posted (edited)

You could write an user tool, which you set to not save on execute https://www.autoitscript.com/wiki/Adding_utilities_to_the_SciTE_Tools_menu

Then the script would copy all text from the scite window, save that to a temporary file, let the syntax checker check the code, catch the output and display somehow the errors (for e.g. in a msg box) if there are some ofc.

Or copy the code manually into a new tab, save that and run the checker ...

Edited by Dan_555

Some of my script sourcecode

Posted

A simple solution would be to start SciTEConfig.exe (located in the directory ..\AutoIt3\SciTE\SciTEConfig ).
There you can specify how many backup steps should be created (e.g. 5 previous versions of your source code). If you now execute a RUN within  SciTE, the code will be saved, but you can return to previous versions.

  SciteBackup.jpg.cd55e4fb7e5a798f60905d4d5493a229.jpg

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted

The strategy I prefer, as I am using it ALL the time, is the Tidy backup.  You decide when you want to make your backup.  If you are making a lot of changes and want to rollback to few days ago, then Tidy is more adapted to that situation.  And one non-negligible benefit of Tidy is of course to have your scripts all cleaned-up. ;)

  • Solution
Posted

Thanks. Where are the various tools documented?

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Posted

To me, it is desirable to have a script that has bugs in it, bugs that AutoIt catches, not be saved automatically. It makes sense to be able to avoid saving such code until it has been fixed.

 

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

  • Developers
Posted

Not really to me. It makes sense not to put it into production before it's error free and bug free, but to be able to check and test it, you always will have to save it one way or the other.

So one thing you could think of is to create a script that will copy the clicked file to a development directory before opening it, but that will open a whole other can of worms, like missing local includes and wrong paths for opening files.

So to me one needs to setup a development environment for those scripts that are important.

My 2 cents :-)

 

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...