AutoHotkey hostring library of BBCode codes for this forum

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
mslonik
Posts: 145
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

AutoHotkey hostring library of BBCode codes for this forum

24 Nov 2023, 07:55

Dear Forum,

Disclaimer: I had to disable BBCodes for this post in order to correctly display code at the bottom of this post. The code at the bottom of this post contains BBCodes which render improperly.

I've found that creating new posts can be supported with a bunch of hotstring definitions to ease entering of this forum BBCodes. So I created one set for myself which is native for [url=viewtopic.php?f=6&t=82352]Hotstrings − this forum[/url], [url=https://github.com/mslonik/Hotstrings]Hotstrings − GitHub[/url] application which I maintain. Over the years I've created a bunch of hotstrings libraries, which are stored at this [url=https://github.com/mslonik/Hotstrings-Libraries]GitHub link[/url].

The [b]Hotstrings[/b] application is able to export definitions from its native CSV format (open!) to native AHK (both: static or dynamic). Unfortunately, this way some information is lost. The [b]Hotstrings[/b] application is able to display on-screen-menu if one triggestring can be expanded to multiple hotstrings. Native AutoHotkey hotstring cannot do that, so after exporting "BBCode.ahk" library shows only the first hotstring out of few.

The [b]Hotstrings[/b] application also is able to show user on-screen-menu called "triggerstring tips menu" on time of typing, to give a user hint what kind of triggerstrings are available.

I hope somebody will find it useful.

Kind regards, mslonik (🐘)

[code]
; This file is result of export from Hotstrings.ahk application (https://github.com/mslonik/Hotstrings).
#SingleInstance force ; Only one instance of this script may run at a time!
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detection of common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
FileEncoding, UTF-8 ; Sets the default encoding for FileRead, FileReadLine, Loop Read, FileAppend, and FileOpen(). Unicode UTF-16, little endian byte order (BMP of ISO 10646). Useful for .ini files which by default are coded as UTF-16. https://docs.microsoft.com/pl-pl/windows/win32/intl/code-page-identifiers?redirectedfrom=MSDN

:*Z:bbca::[clyp]http://clyp.it/nyau5xjc[/clyp]{left 7} ;audio file
:*Z:bbcb::[b]text[/b]{left 4} ;bold text
:*Z:bbcbold::[b]text[/b]{left 4} ;bold text
:*Z:bbccenter::[center]text[/center]{left 9} ;center text on screen
:*Z:bbccode::[code]`n[/code]{left 8} ;code full
:*Z:bbcdocs::[docs]MsgBox[/docs]{left 7} ;Links to a topic in the documentation
:*Z:bbcfc::[color=red]text[/color]{left 8} ;font color ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
; :*Z:bbcfc::[color=#FF0000]text[/color]{left 8} ;font color ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
:*Z:bbcfont::[font=Arial]text[/font]{left 7} ;change font
:*Z:bbcfontcolor::[color=red]text[/color]{left 8} ;font color ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
; :*Z:bbcfontcolor::[color=#FF0000]text[/color]{left 8} ;font color ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
:*Z:bbcgist::[gist]gistnumber[/gist]{left 7} ;embedded gist
:*Z:bbchorizontalline::[hr][/hr] ;horizontal line
:*Z:bbchr::[hr][/hr] ;horizontal line
:*Z:bbcic::[c]code[/c]{left 4} ;inline code
:*Z:bbcim::[img]http://image_url[/img]{left 6} ;insert image
:*Z:bbcindent::[indent=1]text[/indent]{left 9} ;indented text
:*Z:bbcinlinecode::[c]code[/c]{left 4} ;inline code
:*Z:bbcinsertimage::[img]http://image_url[/img]{left 6} ;insert image
:*Z:bbcit::[i]text[/i]{left 4} ;italic text
:*Z:bbcitalic::[i]text[/i]{left 4} ;italic text
:*Z:bbckbd::[kbd]Ctrl[/kbd]{left 6} ;keyboard key
:*Z:bbclb::[list]`n[*]text`n[/list]{left 8} ;list bulleted
:*Z:bbcli::[*]text ;list item
:*Z:bbclistbulleted::[list]`n[*]text`n[/list]{left 8} ;list bulleted
:*Z:bbclistitem::[*]text ;list item
:*Z:bbclyp::[clyp]http://clyp.it/nyau5xjc[/clyp]{left 7} ;audio file
:*Z:bbcm::[mention][/mention]{left 10} ;mention
:*Z:bbcola::[list=a]`n[*]Point a`n[/list]{left 8} ;ordered list alphabetical
:*Z:bbcoln::[list=1]`n[*]First point`n[/list]{left 8} ;ordered list numbered
:*Z:bbcorderedlistalphabetical::[list=a]`n[*]Point a`n[/list]{left 8} ;ordered list alphabetical
:*Z:bbcorderedlistnumbered::[list=1]`n[*]First point`n[/list]{left 8} ;ordered list numbered
:*Z:bbcq::[quote]`n[/quote]{left 9} ;quote
:*Z:bbcquote::[quote]`n[/quote]{left 9} ;quote
:*Z:bbcsec::[section id=section_ref_id]text here[/section]{left 10} ;section
:*Z:bbcspoiler2::[spoiler2=title]text[/spoiler2]{left 11} ;title spoiler
:*Z:bbcspoiler3::[spoiler3=title]text[/spoiler3]{left 11} ;onmouse spoiler
:*Z:bbcspoilerm::[spoiler]text[/spoiler]{left 10} ;spoiler menu ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
; :*Z:bbcspoilerm::[spoiler2=title]text[/spoiler2]{left 11} ;spoiler menu ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
; :*Z:bbcspoilerm::[spoiler3=title]text[/spoiler3]{left 11} ;spoiler menu ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
:*Z:bbcspoilermouse::[spoiler3=title]text[/spoiler3]{left 11} ;onmouse spoiler
:*Z:bbcspoilert::[spoiler]text[/spoiler]{left 10} ;spoiler menu
:*Z:bbcspoilertitle::[spoiler2=title]text[/spoiler2]{left 11} ;title spoiler
:*Z:bbcstrike::[strike]text[/strike]{left 9} ;strike text ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
; :*Z:bbcstrike::[s]text[/s]{left 4} ;strike text ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
:*Z:bbcunderlinetext::[u]text[/u]{left 4} ;underline text
:*Z:bbcurl::[url=http:/url]URL text[/url] ;URL = Uniform Resource Locator
:*Z:bbcut::[u]text[/u]{left 4} ;underline text
:*Z:bbcuunderline::[u]text[/u]{left 4} ;underline text
:*Z:bbcyt::[y2be]http://y2u.be[/y2be]{left 7} ;YouTube links ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
; :*Z:bbcyt::[youtube]http://www.youtube.com/watch?v=dQw4w9WgXc[/youtube]{left 10} ;YouTube links ;Warning, code generated automatically for definitions based on menu, see documentation of Hotstrings application for further details.
[/code]

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 99 guests