Add a quicker Autohotkey Button to the forum reply page

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Add a quicker Autohotkey Button to the forum reply page

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

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

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

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

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

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:

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

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...

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

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. :)

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

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.

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

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: .

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

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.

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

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?

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

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.

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

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...

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

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.

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

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.

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

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:

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

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 5122 times

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

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

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

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)

Add a quicker Autohotkey Button to the forum reply page

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 5199 times

Top