Jump to content
Sign in to follow this  
MHz

Au3 Script Database Viewer

Recommended Posts

MHz

au3_script_database_viewer.gif

Summary

The program which I will abbreviate as ASDV was created with the intention of easily archiving AutoIt scripts that are loaded in a programming editor. Sometimes you may find many scripts open in your editor and may want an easy way to store them and release them from the editor. ASDV takes a single path parameter so the editor can pass the path to the script and the ASDV will insert it into a SQLite database. The whole process should be rather simple to store the script. Once done and satisfied, then you can close the script in the editor and have fewer scripts open at one time. ASDV allows you access to the stored script at any time. You can make routine backups of the database to prevent any data loss. Backups can be compressed by zip or similar and may take up a little amount of space.

ASDV supports adding scripts as mentioned previous and also does the following features when you right click on the title listbox.

About title
 - Output of information about the title selected from the database

Copy title
 - Copies for e.g. "Example 1" to the clipboard

Copy script
 - Copies the whole script in the viewer to the clipboard

Delete title and script
 - Removes the entry permanently from the database

RunWait script
 - Writes the viewed script to a file in @TempDir and runs it from there with @AutoItExe

Save script
 - Saves the viewed script to an au3 file

View script in your web browser
 - Perhaps a nicer way to view a script with some coloring done on keywords

Font size
 - For preference of those with great eye sight or near blind

Download

Au3 Script Database.zip

Under terms of GPL3

Requires SQLite.au3 which will is a standard include in AutoIt3. SQLite3.dll if you do not have it already here.

Tested with AutoIt 3.3.8.1 + and latest SQLite3.dll. Further details can be found in the help file included.

Homepage can be found here.

:)

  • Like 2

Share this post


Link to post
Share on other sites
mLipok

I got this error:

 

Au3 Script Database.au3

OK
SQLite startup failed with error 1

 

What I must do to use your script ?


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library
 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-10-31

Share this post


Link to post
Share on other sites
MHz

Startup opens the handle of the SQLite dll file. If you do not already have the dll file then you can download the latest dll here marked as sqlite-dll-win32-x86-3080100.zip. Unzip the dll and placed the file in the path of the script, which can be the working path or a path in your PATH environmental variable. SQLite3.dll is 32 bit so you will need to run the script as 32 bit to access the dll. If you want a 64 bit dll for a 64 bit script then look in the AutoIt archive here for a _x64.dll version and name it as sqlite3_x64.dll.

Give that a try. :)

Share this post


Link to post
Share on other sites
mLipok

I try your script

Cool, even wonder about whether not to use it, because now I have a mess on my disk.
 
However, I miss its many functions.
 
1 Rename a group
2 add their own groups
3 adding a GUI script from file
4 adding a GUI script from the clipboard
5 adding information about the source of such a url to forum
6 display the recording date in the database
 
I'd love to, I would have added such features.
At the moment, however, I have many other projects in the open production process.

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library
 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-10-31

Share this post


Link to post
Share on other sites
MHz

mlipok,

It is up to you if you want to use it or not. Its value depends on whether you have a need or not and how you would use it. The purpose of its creation was to release the build up of scripts that I tend to get in the editor. So I designed it for that purpose. I have yet to put it into good permanent use as I spent much time deleting the databases in testing. I even had ideas while making this that variations of it could happen, like an All Script Database viewer, or just CMD..., VBS... etc. Perhaps even store HTML files and such. I considered storing Au3 scripts would be enough for now and I focused on that.

Now, I do not know how you could miss something when you never had it from the start or at present. :ermm:

As for your ideas.

1. That could be done though what a database editor can handle. Would need consideration and perhaps later may add.

2. There is a *.lst file where you can add table names so when the database is 1st setup, it sees the file and uses those names. Is that what you are referring to? Later can be done with a database editor or such. Or perhaps same as number 1.

3. Unsure of what you mean exactly. Remember this was designed as a backend application and perhaps you are suggesting for something that is more standalone design like a variation of it as I mentioned above.

4. Like 3 but ClipGet. The content would want to be known before inserting it into the database much like you view in a database editor. You would not want to accidentally store blobs of unknown data from the clipboard.

5. I could go into versions, authors, etc as well. I thought of that earlier and considered that is what a script header does as it stores whole scripts and not just bits of data. It would seem to be a double amount of input. I had more table names originally as default, and cut that back as I consider that I was adding too much for the average user to maintain. And once the database is setup then adding columns to the program in a new version could then make it incompatible to older existing databases.

6. Display the modified date stored as always shown. This is possible. I could try and prepend it to the bottom label. I added the bottom label so longer titles in the list box could be viewed across the width of the Gui and it helped with the larger font zooming.

Thanks for the ideas. :)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×