Great script! I was looking for some code to ease inputing BBCode in these little textareas, since stupid phpBB script always append the codes at the end of the area instead of inserting them where the caret is.
Your program is even better! I like the preview.
And this is an impressive example of GUI by AHK.
I wanted to test with a post I was writting, and the preview was awful, with font becoming suddently big and overlaid.
I found it was because I wrote some raw HTML codes: "<p> ends when meeting <h1>, <ul>".
So I added three lines before the bold formatting:
Code:
; Convert HTML sensitive chars ###############################################
StringReplace, bbcode, bbcode, &, &`;, All
StringReplace, bbcode, bbcode, <, <`;, All
StringReplace, bbcode, bbcode, >, >`;, All
I also added a `n after <br> so view source is nicer.
I might prefer to insert starting and ending tag at once, and put the caret between. I will see that.
Also I can exit after doing changes, perhaps it should ask to save before, if possible. Not if text has been changed or copied with the button.
Excellent work!