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

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

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

24 Nov 2018, 14:23

hotkeyguy wrote:
09 Nov 2018, 15:42
Hello GeekDude,

many thanks for CodeQuickTester v2.8, especially Save/Save As and rename. I just wanted to ask. And OutputDebug works now (not in v2.7). Yep, I got v2.7 compiled meanwhile. No problems starting v2.8.

Greetings and thanks for that early St. Nicholas' Day gift :xmas:
hotkeyguy
You're welcome! I'm not sure what you are trying to do with OutputDebug but if it's working now then great! I'm not aware of any changes I've made that would influence this, other than I updated the version of AHK_H being used in the compiled script.
CyL0N wrote: Sweet :thumbup: , but RIBBONS,where be the RIBBONS :shifty: .... i guess i Can wait :cookie: . But really though,much needed update so thanks. :salute:

A suggestion for the next patch, for status bar instead of , I think |, is a bit more poignant,comma just looks a little weird.
Something like this,

Code: Select all

 SB_SetText("Len " Len " | Line " Row " | Col " Col
 . (Sel > 0 ? " | Sel " Sel : "") " " this.SyntaxTip)
You may have confused ribbon design with the Windows 10 window manager. I haven't done any significant theming changes other than reducing/removing margins in the main GUI. It may be possible to grab one of those window theming dlls that are basically drop-in addons for the script but I can't do that while maintaining the "all functionality should be available when using just one file" requirement I've been trying to uphold.

As far as the status bar, I was mostly trying to copy how they handle the status bar in the popular new editor Visual Studio Code. A vertical pipe might be better, but maybe not. Microsoft has a reasonable design team and I would bet they've done UX testing on this topic and found people preferred the commas. Status bar design is definitely a point to revisit in the future.
SpecialGuest wrote: Keep it comin' GeekDude 8-)
By the way: I would love to see this get tabs some day
I'm glad you like what I've been cooking up! I would also like to see it get tabs some day, but I think there might need to be some rethinking first. The more parts in a single script, the more likely that script is to hang or crash. If I am going to increase the propensity for crashing, I should consider what the script should do in the event of a crash: Should I introduce auto-saving to a temporary file for unsaved script panes? That's a little antithetical to one of the goals of the script (don't create temporary files). Is that goal still a good thing to shoot for?

Should I attempt to go for a browser-like approach where each tab has its own process, so that if one crashes it won't take down the whole editor? If so, how should I perform process management? There's an API in Windows to designate some processes as children to be killed when the parent dies but when I was testing it I couldn't get it to work.

So many options :shock:
r2997790 wrote: Geekdude, thank you for your continuing hard work on CodeQuickTester. It's a wonderful tool.

I'm glad you haven't overloaded it with functionality. It remains a joy to use for testing code snippets and short routines.
Thank you for the nice comment!

I'm not sure what the threshold is for overloaded haha, I've been slowly adding more things to it over a long time. Working in it before there was a right click menu or a find and replace dialog just felt kind of... incomplete. I'm probably going to keep adding things until you change your mind :lol:.
SpecialGuest wrote:Desperate attempt at fixing integration (to be ignored lol) :
*snip*
ozzii wrote: @SpecialGuest
Thanks for the update but I have this when I click to open on your code:
*snip*
SpecialGuest wrote: Thanks for letting me know. Hadn't really had the chance to look at it very long last night.
Just saw the regular integration wasn't doing anything and attempted to fix the link.
It seems I didn't look at it long enough to notice the result being the whole page instead of the codebox' content :shh: lol
Consider this to be broken for now as we require the download link, which isn't available anymore on the current codebox..
With the download link you can retrieve the codebox' content but I don't see a way to do it with the forum being as it is atm.
ozzii wrote:OK, I will wait for a fix, I hope....
I've been thinking of a way to make this work, and I'm wondering now if there's a way for me to jam the code into something like a Base64 string that I pass to the script instead of an http(s) link. Of course, this will depend on how much data is supported in one of those links but people use similar links to embed images into html so hey maybe it'll work :)
kiwichick wrote: Hi there, this is such a nifty little script. So helpful! I have a couple of requests. First, will you please make it possible to open it maximised, or at least remember the last window setting? And second, will you please change the wording for "Open Help File" to specify that it's the AutoHotkey help file that's opened, not a CodeQuickTester help file? Keep up the good work. Cheers.
I'm glad you like it! Configuring the window size and having it remember the last window size is on the roadmap already, so you can expect to see it in the future.

The help file link could be a little more descriptive, though I don't think it's especially misleading as it is. I can definitely update it to say something like "Open AHK Help File" instead if you'd like.
CyL0N wrote: Bug: Line Numbering Gets Messed Up With Ctrl+Home, Ctrl+End., given a script with more than 200lines...
Yeah that's a known issue. I have no idea why it does that but if you figure it out let me know :lol:. If not, it's on my list of things to look at in the future.
CyL0N
Posts: 210
Joined: 27 Sep 2018, 09:58

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

24 Nov 2018, 21:15

GeekDude wrote:
24 Nov 2018, 14:23
By ribbon I really only meant, https://i.imgur.com/VvDa2jx.png ,looking at it closer it looks so much like a ribbon GUI,though not so much now I know its not.

Can I possibly get an example GUI to get that effect?

I didn't know you could do that with margins... though I recall removing button styles removed button borders...hmm...
live ? long & prosper : regards
CyL0N
Posts: 210
Joined: 27 Sep 2018, 09:58

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

25 Nov 2018, 22:07

GeekDude wrote:
24 Nov 2018, 14:23
CyL0N wrote: Bug: Line Numbering Gets Messed Up With Ctrl+Home, Ctrl+End., given a script with more than 200lines...
Yeah that's a known issue. I have no idea why it does that but if you figure it out let me know :lol:. If not, it's on my list of things to look at in the future.
It seems to be an issue with desynchronised controls,here's my fix:

Code: Select all

#IfWinActive CodeQuickTester
^End::
ControlGet, lnID, Hwnd,, RICHEDIT50W2, A	;ln = lineNumbering control ID
ControlGet, ecID, Hwnd,, RICHEDIT50W1, A	;main edit control ID
lastLine := GetLineCount(lnID), ScrollLines(lastLine,lnID), ScrollLines(lastLine,ecID)
ControlClick, RICHEDIT50W1
ControlSend, RICHEDIT50W1, {PgUp}{PgDn}, A
Return
;======================================================================================
#IfWinActive
ScrollLines(lines,hWnd="") {
	static EM_LINESCROLL := 0xB6
	PostMessage, EM_LINESCROLL, 0, lines-1, , ahk_id %hWnd%   ; 'lines-1' makes the line you wish to jump to visible
}
GetLineCount(ctrlHwnd){
	static EM_GETLINECOUNT = 0xBA
	SendMessage, EM_GETLINECOUNT,,,, ahk_id %ctrlHwnd%
	Return ErrorLevel
}
Last edited by CyL0N on 26 Nov 2018, 22:30, edited 2 times in total.
live ? long & prosper : regards
User avatar
kczx3
Posts: 858
Joined: 06 Oct 2015, 21:39

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

26 Nov 2018, 19:28

I bet there is a way to directly he the number of lines in the control instead of looping over them
CyL0N
Posts: 210
Joined: 27 Sep 2018, 09:58

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

26 Nov 2018, 20:23

kczx3 wrote:
26 Nov 2018, 19:28
I bet there is a way to directly he the number of lines in the control instead of looping over them
Perhaps,but even internally looping is how the line number is retrieved. Search for this.Settings.Gutter.Width.
live ? long & prosper : regards
CyL0N
Posts: 210
Joined: 27 Sep 2018, 09:58

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

26 Nov 2018, 20:50

kczx3 wrote:
26 Nov 2018, 20:36
https://docs.microsoft.com/en-us/window ... tlinecount

Though maybe word wrap messes it up for this tool?
Works well,updated my post accordingly.

Cheers.
live ? long & prosper : regards
0x00
Posts: 79
Joined: 22 Jan 2019, 13:12

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

01 Feb 2019, 08:02

Bug Report: Cancelling Rename discards filename.




Love this little thing,been so long since I actually used anything else. Cheers Dude.
hotkeyguy
Posts: 128
Joined: 11 Oct 2014, 12:22

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

31 May 2019, 07:57

Hello again,

great would be
  1. some global variables, with prefix e. g. cqt_x/y/w/h, for positioning own GUIs in relation to the CQT GUI.
    Especially when AlwaysOnTop, own GUIs are hidden,
  2. Run [F5] should toggle between the two modes Run and Kill.
    Don't know whether that is possible but when the own GUI is closed mode should be Run again,
  3. a special folder for templates and an corresponing Open Template... menu item,
  4. a MRU (most recently used) file list,
  5. all menu items should have mnemonics (the [Alt+_] combinations) or much better shortcuts.

Many thanks for all your efforts and greetings
hotkeyguy

Return to “Scripts and Functions”

Who is online

Users browsing this forum: tmplinshi and 52 guests