Add a quicker Autohotkey Button to the forum reply page

Discuss issues and requests related with the forum software

Add a quicker "Autohotkey code" button?

YES
2
50%
NO
2
50%
 
Total votes: 4

AHK_user
Posts: 515
Joined: 04 Dec 2015, 14:52
Location: Belgium

Add a quicker Autohotkey Button to the forum reply page

Post by AHK_user » 21 Jul 2021, 04:00

I would like it if a "Autohotkey code" button is added to the reply page.
Or at least put it on top of the list when selecting "Select code".
I know that the "code" button is there, but most of the people use "Autohotkey code" because it looks better.

Let`s optimize or way of replying :lol:
Here is the code that i wrote to time the miliseconds to see how quick i was to click the autohotkey code, 3 seconds was the best I could do :lol:

Code: Select all

F12::
if (Tickcount_old>0){
	TrayTip, Timer , % A_TickCount- Tickcount_old " miliseconds", 10
}
else{
	TrayTip, Timer , started, 2
}
Tickcount_old:= A_TickCount
return
2021-07-21 10_40_08-Window.png
2021-07-21 10_40_08-Window.png (102.24 KiB) Viewed 4399 times

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Add a quicker Autohotkey Button to the forum reply page

Post by gregster » 21 Jul 2021, 04:09

If I understand you correctly, you want "AutoHotkey" preselected when the [codebox] tag is inserted - and to also add a button for this..

Yes, I guess that would make sense, because many people just choose the default "text" format at the top of the dropdown.
(I regularly edit these codeboxes to change them to autohotkey format.)

That means, a button that inserts:
[Codebox=autohotkey file=Untitled.ahk][/Codebox]
instead of
[Codebox=text file=Untitled.txt][/Codebox] (or whatever the user chooses)

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Add a quicker Autohotkey Button to the forum reply page

Post by gregster » 21 Jul 2021, 04:17

I know that the "code" button is there, but most of the people use "Autohotkey code" because it looks better.
But is there really a visual advantage of the codebox tag over the simple code tag ?

Codebox tag (with 'autohotkey' format selected):

Code: Select all

F12::
if (Tickcount_old>0){
	TrayTip, Timer , % A_TickCount- Tickcount_old " miliseconds", 10
}
else{
	TrayTip, Timer , started, 2
}
Tickcount_old:= A_TickCount
return
"Normal" Code tags (fifth button from the left; in the 'Digi' theme it is labeled </>):

Code: Select all

F12::
if (Tickcount_old>0){
	TrayTip, Timer , % A_TickCount- Tickcount_old " miliseconds", 10
}
else{
	TrayTip, Timer , started, 2
}
Tickcount_old:= A_TickCount
return
The only difference seems to be the additional "Download" link, when Codebox is used instead of code.
That's why I usually just use the code tags, and don't even bother with the codebox dropdown.

Or are you talking about inline code tags (c-tags) ? In my experience, there are not many people who use them for multi-line code:
if (Tickcount_old>0){
TrayTip, Timer , % A_TickCount- Tickcount_old " miliseconds", 10

User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Add a quicker Autohotkey Button to the forum reply page

Post by boiler » 21 Jul 2021, 08:16

(Edit: I see now that @gregster did point out this specific button. I'll leave my post since it shows the image.)

Perhaps @AHK_user isn’t aware that the </> button (highlighted in red in the image below) produces the [code][/code] tags and thought the only way to get a true code box was to use the dropdown list (because most people actually use that button, not the one from the dropdown as AHK_user mentioned was the case). I think you are right @gregster, that it was probably thought that the c tags were the only dedicated code button.

code tags key.png
code tags key.png (10.11 KiB) Viewed 4322 times
Last edited by boiler on 21 Jul 2021, 08:34, edited 3 times in total.

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Add a quicker Autohotkey Button to the forum reply page

Post by joedf » 21 Jul 2021, 08:21

As gregster said, they look the same except for the download option. This is because you can specify a "file" option on [codebox].
As for the syntax colors, I know they are the same because the original geshi syntax highlighter was broken so I made it all use the same prism.js highlighter. :ugeek:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

safetycar
Posts: 435
Joined: 12 Aug 2017, 04:27

Re: Add a quicker Autohotkey Button to the forum reply page

Post by safetycar » 21 Jul 2021, 09:08

Now that codebox is being mentioned, I think it would be nice that AutoHotkey scripts could be downloaded already with BOM.
I don't know how much effort it would take, but it could potentially save headaches for people. I can imagine people that need it working directly in the files they download without noticing.

TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Add a quicker Autohotkey Button to the forum reply page

Post by TAC109 » 21 Jul 2021, 16:09

Yes please! I use the prosilver theme and I have difficulty setting the AutoHotkey format. Generally I have to find another post which has done this and copy the tags, otherwise I can never get it to work properly, and eventually give up.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Add a quicker Autohotkey Button to the forum reply page

Post by gregster » 21 Jul 2021, 16:24

Why don't you use the [code][/code] tags then ? It's nearly the same. Fifth button from the left in the full editor, in all themes afaik.
See boiler's image above. I think in some themes it is even labeled 'code', instead of </> (but there is also an informative tooltip).
I mean, the additional 'Download' button of the codebox tag is fine, but before I would go on a treasure hunt and eventually give up...

TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Add a quicker Autohotkey Button to the forum reply page

Post by TAC109 » 21 Jul 2021, 21:29

That’s what I do - use the code tags, because the alternative is too hard at present. Any method of simplifying the use of 'AutoHotkey Code' would be appreciated.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Add a quicker Autohotkey Button to the forum reply page

Post by boiler » 21 Jul 2021, 21:47

What is it about the use of the “AutoHotkey Code” box that is that much better than the “code” tags? Is it just the “Download” link? There isn’t any other feature it has, is there? You caught the part that there is already a button for the “code” tags so you don’t have to type them, right?

TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Add a quicker Autohotkey Button to the forum reply page

Post by TAC109 » 21 Jul 2021, 22:32

boiler wrote:
21 Jul 2021, 21:47
What is it about the use of the “AutoHotkey Code” box that is that much better than the “code” tags? Is it just the “Download” link? There isn’t any other feature it has, is there? You caught the part that there is already a button for the “code” tags so you don’t have to type them, right?
Duh!

This feature provides a download button and the ability to name the piece of code. It is not something I would use all the time, but it would be useful to be able to access this feature easily when needed.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

AHK_user
Posts: 515
Joined: 04 Dec 2015, 14:52
Location: Belgium

Re: Add a quicker Autohotkey Button to the forum reply page

Post by AHK_user » 22 Jul 2021, 15:50

True, I was not aware of the </> button :facepalm: , my excuses.

But I would appreciate to give Autohotkey the first place to the Select code dropdown menu, according to my estimations, it is the most used language in this forum :lol: .

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Add a quicker Autohotkey Button to the forum reply page

Post by joedf » 22 Jul 2021, 16:18

About UTF8 BOM: I think there's a reason why explicitly don't have it... but dont have the reason in mind right now...
For the download, when I was implementing codeboxes with prismjs... I didn't add "download" for [/code] since I would have had to modify phpbb php-code to a file parameter.
However, I can add a default download with filename "untitlted.ahk" if people feel strongly about it...:think:
Either way, I can look into it.
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Add a quicker Autohotkey Button to the forum reply page

Post by TAC109 » 22 Jul 2021, 17:41

joedf wrote:
22 Jul 2021, 16:18
About UTF8 BOM: I think there's a reason why explicitly don't have it... but dont have the reason in mind right now...
A BOM could cause problems with a code snippet when it is inserted into an existing script.
However, I can add a default download with filename "untitlted.ahk" if people feel strongly about it...
A second option to the standard <\> ([ code ]) icon (or within it) would be great. :)
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Add a quicker Autohotkey Button to the forum reply page

Post by gregster » 22 Jul 2021, 18:26

Afaik, a BOM won't be necessary any longer in AHK v2 - so at least its relevance will decrease over time...

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Add a quicker Autohotkey Button to the forum reply page

Post by joedf » 22 Jul 2021, 21:52

Right... either way, I will not be adding the BOM.... :mrgreen:
@TAC109 You mean change the look of the </> button to include "code" ? I believe at this point, it's more about learning the interface. I think stylish / userstyles would be more appropriate in this case... :think:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

TAC109
Posts: 1098
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Add a quicker Autohotkey Button to the forum reply page

Post by TAC109 » 22 Jul 2021, 23:44

@joedf Any way you like is fine by me - as long as it is easier to select and use the AutoHotkey download format as discussed. A name of 'untitled.ahk' is fine, as it will be easy to change to a specific name if necessary.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Add a quicker Autohotkey Button to the forum reply page

Post by joedf » 25 Jan 2022, 12:29

Okay, I saw this in my todo list today and had a bit of time, and thought of simpler solution than I had originally thought of. :thumbup:
So both codebox types should now have a download option. However, the simpler [/code] defaults to "Untitled.ahk" and cannot be customized. Please use [/codebox] instead for this.
I will not be changing [/code] for this as Phpbb seems to handle them very differently. :P
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Post Reply

Return to “Forum Issues”