[Script] CodeQuickTester - Write and run code without saving to a temporary file

Post your working scripts, libraries and tools
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

04 Jun 2018, 07:09

StefOnSteroids wrote:Great idea to allow a settings file - so users can keep their custom font sizes, colors etc from version to version.
Would you please provide a sample settings.ini or give a few guidelines what the ini-file must look like?


There are instructions and a template in the original post if this thread, under the additional setup header.
StefOnSteroids
Posts: 39
Joined: 08 Aug 2015, 10:22

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

04 Jun 2018, 07:32

GeekDude wrote:There are instructions and a template in the original post if this thread, under the additional setup header.

My bad, I went straight to the Github page to get the new version, without noticing the ini-template.
Many thanks. The settings-file makes things so much easier. :thumbup:
brutus_skywalker
Posts: 179
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

04 Jun 2018, 10:43

StefOnSteroids wrote:Great idea to allow a settings file - so users can keep their custom font sizes, colors etc from version to version.
Would you please provide a sample settings.ini or give a few guidelines what the ini-file must look like?


It's in the OP.

https://github.com/G33kDude/CodeQuickTester/blob/master/Settings.ini
Outsourcing Clicks & Presses Since 2004.
StefOnSteroids
Posts: 39
Joined: 08 Aug 2015, 10:22

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

05 Jun 2018, 07:11


Thanks for the direct link. Next time I will more thoroughly peruse available resources. :oops:
brutus_skywalker
Posts: 179
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

07 Jun 2018, 09:52

Hi i dunno if it a can be called a bug, but i was using it for like 8hours straight last night and it seemed the longer i used it the wonkier the auto-completion, and the slower it got overall, i had like 6separate (CodeQuickTester)windows open, and the largest script i had open was no more than a thousand lines. And by wonky i mean there seemed to be somewhat of a lag and often i had to backspace to get auto-completion & highlighting activated.

The only modification i made to the script is to the font size of the status bar: Around Line900

Code: [Select all] [Download] GeSHi © Codebox Plus

		; Add status bar
Gui, font, s14, Courier New Bold
Gui, Add, StatusBar
SB_SetParts(100, 110, 90, 110, 100)
this.UpdateStatusBar()
Outsourcing Clicks & Presses Since 2004.
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

08 Jun 2018, 09:09

brutus_skywalker wrote:Hi i dunno if it a can be called a bug, but i was using it for like 8hours straight last night and it seemed the longer i used it the wonkier the auto-completion, and the slower it got overall, i had like 6separate (CodeQuickTester)windows open, and the largest script i had open was no more than a thousand lines. And by wonky i mean there seemed to be somewhat of a lag and often i had to backspace to get auto-completion & highlighting activated.

I'm having trouble reproducing the issue. Do you have any idea what might have been causing it? Was it using much more RAM than it typically does?
brutus_skywalker
Posts: 179
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

08 Jun 2018, 19:44

GeekDude wrote:I'm having trouble reproducing the issue. Do you have any idea what might have been causing it? Was it using much more RAM than it typically does?


Somewhat, memory doubles when the open/save dialog is active(receding only when inactive) & there's a similar CPU spike, but fairly consistent RAM usage relative to open size of open script. I'm thinking possibly the problem was that i had too many windows open, though i can't see how it's the cause. But i must re-iterate this issue,was the result of extended use across numerous windows, which makes me suspect script process might somehow have gotten paged or something.
Outsourcing Clicks & Presses Since 2004.
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

11 Jun 2018, 18:56

brutus_skywalker wrote:Somewhat, memory doubles when the open/save dialog is active(receding only when inactive) & there's a similar CPU spike, but fairly consistent RAM usage relative to open size of open script. I'm thinking possibly the problem was that i had too many windows open, though i can't see how it's the cause. But i must re-iterate this issue,was the result of extended use across numerous windows, which makes me suspect script process might somehow have gotten paged or something.


Multiple instances shouldn't conflict with each other in any way, and that note about memory usage sound completely fine.

I'm stumped as to what could have been causing your issue. Can I blame the antivirus? :lol:
brutus_skywalker
Posts: 179
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

12 Jun 2018, 04:20

GeekDude wrote:]
Multiple instances shouldn't conflict with each other in any way, and that note about memory usage sound completely fine.

I'm stumped as to what could have been causing your issue. Can I blame the antivirus? :lol:


I don't think so,I use Microsoft Security Essentials,pretty solid AV,plays well with everything.

And I've now been running it with v1.1.26.01(x32 Unicode) and no issues. Needless to say I no longer believe it's the script, I think it's something to do the combination of the 1.1.29.01(x32 Unicode) update and my OS(Win 7 x64 ultimate SP1).

I'm gonna hold off on a bug report to lexikos though, given I seem to be the only one whose observed and noted this issue on the forum. Cheers & Thanks for looking into it.
Outsourcing Clicks & Presses Since 2004.
r299790

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

17 Jul 2018, 13:42

Hi Everyone

Love this tool so much... I was wondering if there is a way to 'autosave' your code in the event of something going wrong.

AHK Studio has this feature / Sublime too -- some kind of autosave would be brilliant.

Many thanks
R
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

23 Jul 2018, 17:32

r299790 wrote:Hi Everyone

Love this tool so much... I was wondering if there is a way to 'autosave' your code in the event of something going wrong.

AHK Studio has this feature / Sublime too -- some kind of autosave would be brilliant.

Many thanks
R


There's no built in way to auto-save, but I'm working on making saving less painful (i.e. by remembering what file you have open and not prompting you to pick the file every time).



Also, line numbers are coming :)

Image
SpecialGuest
Posts: 21
Joined: 15 May 2016, 07:49

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

24 Jul 2018, 17:36

Really handy and creative. Would love to see an auto-saving feature (on load) / snippets manager, optionally with a link to the thread it came from maybe ?
This way one can easily load already opened scripts without having to save them first or manually find them later. I only use it to open scripts from codeboxes here atm.
Looking forward to what's next - cheers !
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

24 Jul 2018, 21:23

SpecialGuest wrote:Would love to see an auto-saving feature (on load)

You mean when you hit run? Should be possible, perhaps even easy, to implement. I'll add it to my list of things to do.

SpecialGuest wrote:snippets manager, optionally with a link to the thread it came from maybe ?
This way one can easily load already opened scripts without having to save them first or manually find them later. I only use it to open scripts from codeboxes here atm.

Do you have any examples of snippets that you would store? I'm not sure if having a snippet manager built in is the right way to go about this. Maybe a companion app that works well with CQT would be better?

SpecialGuest wrote:I only use it to open scripts from codeboxes here atm.

I'm glad to hear someone is using this functionality! I wasn't sure if anyone had bothered to set it up other than me.

SpecialGuest wrote:Really handy and creative.
...
Looking forward to what's next - cheers !

Thanks!




Image

Zoom works properly now.
SpecialGuest
Posts: 21
Joined: 15 May 2016, 07:49

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

25 Jul 2018, 17:38

I meant like saving the scripts when you open them from a codebox. So you don't need to download/save them too.
A "Get" buttom next to "Open" could do that so you would still have a regular "Open" button as well.

A snippet manager could indeed be overkill - a companion app would be nice but maybe too much hassle for the features you'd get.
Simply auto-saving them and being able to open them from inside CQT would do it already I think.

I really like the way you can quickly run scripts with CQT so imho setting it up that way is the nicest, handiest (and most time-saving) feature :)
Last edited by SpecialGuest on 26 Jul 2018, 17:37, edited 1 time in total.
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

26 Jul 2018, 10:13

SpecialGuest wrote:I meant like saving the scripts when you open them from a codebox. So you don't need to download/save them too.
A "Get" buttom next to "Open" could do that so you would still have a regular "Open" button as well.

A snippet manager could indeed be overkill - a companion app would be nice but maybe too much hassle for the features you'd get.
Simply auto-saving them and being able to open them from inside CQT would do it already I think.

I really like the way you can quickly run scripts with CQT so imho setting it up that way is the nicest, handiest and (most time-saving) feature :)

I'm still not quite sure I understand. You're looking for an easier way to download and save code boxes from the forum, hopefully with a little metadata? I assume the benefit over hitting [Download] or hitting [Open] and pressing ^s would be not having to pick the path you want to save to and the automatic inclusion of a forum link, author, etc.

The metadata inclusion and saving could be done as a greasemonkey userscript on its own, though you'd probably have to pick the target folder each time. With an associated AHK script folder selection would be automatic, though I'm still not sure that CQT is really the right tool for the job. A second AHK script, service handler, greasemonkey userscript would be possible and probably even advisable in this situation. That second script, in addition to handling downloads, would also be able to have snippet management built into it at some point if that would be desirable.

I'm thinking the snippet metadata would be best stored in a block comment at the top of the file, something like

Code: [Select all] [Download] GeSHi © Codebox Plus

/*
Author: author
Permalink: link
Post Date: date
...
*/

Is this the kind of thing you're looking for?




I've removed the borders from the RichEdits and got rid of the inner margins on the window. Also, the gutter can now be colored separately from the rest of the editor. Thoughts?

Image
User avatar
kczx3
Posts: 586
Joined: 06 Oct 2015, 21:39

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

26 Jul 2018, 12:39

Looks good. Now just get rid of the horizontal scrollbar on the gutter.
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

26 Jul 2018, 12:53

kczx3 wrote:Looks good. Now just get rid of the horizontal scrollbar on the gutter.

The reason that is there is to keep the vertical dimensions of the gutter the same size as the main body. If it wasn't then the vertical scroll synchronization wouldn't work.

Though now that I've typed that out I went to double check and apparently specifying no horizontal scroll bar still works perfectly fine ¯\_(ツ)_/¯ so disregard the last two sentences.

Image

Also, I was thinking of combining the Line, Col, and Sel sections of the status bar to one larger of the format Cur xyz:xyz:xyz. This would be less clear but it'd free up more space for the syntax hints.
User avatar
kczx3
Posts: 586
Joined: 06 Oct 2015, 21:39

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

26 Jul 2018, 13:09

I think combining those parts of the status bar makes sense. Here's an example of how VS Code displays that information in the status bar.

vscode-status-bar.png
vscode-status-bar.png (1.27 KiB) Viewed 124 times
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

26 Jul 2018, 14:15

I'm testing out some options for combining them. I tried putting the syntax tip on the left and right-aligning the document info, but the text overlaps when the bar gets too short.

I think the approach shown in this gif makes sense even if it's not "pretty".

Image
SpecialGuest
Posts: 21
Joined: 15 May 2016, 07:49

Re: [Script] CodeQuickTester - Write and run code without saving to a temporary file

26 Jul 2018, 17:36

Yeah I like that last one. Still looks clear to me as well.
As for the autodownload it's indeed to avoid having to save all the scritps I open.
I'm the kinda user that opens a lot of stuff at once or keeps windows open.
Maybe tabs could solve the many windows you get when you do that.
Still think saving what you open automagically would make sense. In a subfolder of CQT perhaps.
That way you can default that location for the open and save functions too.
In each case it's already really nice as it is - so just food for thought with regards to possible additions.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 16 guests