sqlnotebook icon indicating copy to clipboard operation
sqlnotebook copied to clipboard

Allow Script Execution at certain events

Open ghost opened this issue 6 years ago • 2 comments

Let the user define script that would be run at certain events, eg. OnNotebookOpen or OnCreateNewNote, etc.

For me, i would use is to drop/clear some tables and refill it with csv data from network shares. Script used for events should be marked, so the user don't delete them by mistake.

ghost avatar Mar 08 '18 14:03 ghost

Hmm, I'll have to think about the implications of that. I don't want the UI to slow down because it's running lots of scripts on events, and I wonder if I'd have to warn the user about the security implications of automatically running the code in the notebook that they may have downloaded off the Internet. But the idea sounds useful.

What about having the ability to add custom toolbar buttons attached to scripts? You'd have to click on the button to run the script, so there would be no chance of accidentally or unintentionally running a script. Would that be good enough?

electroly avatar Mar 09 '18 01:03 electroly

I think these Events are a good peace to work on, if its possible. The shortcuts thing is also a good idea, it would properly help a lot.

Edit: I'm currently working with some sort of automatic software downloader/updater and thinking about the results.

It would be great when i can do something like this:

SqlNotebook.exe "C:\Path\to\my\Notebook.sqlnb" /keepopen /script "<ScriptName>" param1=value1 param2=value2

Sounds this useful?

ghost avatar Mar 09 '18 09:03 ghost