Html to QB64 Quote Converter - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Utilities (https://qb64phoenix.com/forum/forumdisplay.php?fid=8) +---- Thread: Html to QB64 Quote Converter (/showthread.php?tid=3207) |
Html to QB64 Quote Converter - Pete - 11-11-2024 Ever get sick and tired of typing endless CHR$(34) additions to quoted text so it can be used in the IDE. Really, just me? Well I'll post this anyway. Code: (Select All)
So just compile and make a desktop shortcut. When you need to us it, just copy the text you want converted to your clipboard, click the short cut, and paste the converted results. Nothing will show up on your screen, it's all handled in the background. PRINT CHR$(34) + "Pete" + CHR$(34) RE: Html to QB64 Quote Converter - SMcNeill - 11-12-2024 I'm normally so lazy, that when it comes to something like this, I tend to just paste the evil code with quotes into a blank IDE window and then use Fine and Replace on it. Find: " Replace With: '' Do all.... (and if that isn't obvious at first glance, that's a quote relaced with two colons " = ' ' ) So "Steve is Awesome" would convert to become ''Steve is Awesome''. Since I often write my own word wrap routines like you do @Pete , I'll often just toss a simple conversion routine in there where those double colons translate to quotes, before printing/wrapping. RE: Html to QB64 Quote Converter - Pete - 11-12-2024 But senior Steve... I used to do the whole find replace bit, too. Find: " Replace: " + CHR$(34) + " alt="Pete is tremendous" becomes... alt=" + CHR$(34) + "Pete is tremendous" + CHR$(34) + " Helpful, but since the line doesn't include more text after the end quote, it needs the trailing + " cut off. My utility does that. So with my utility alt="Pete is tremendous" becomes... alt=" + CHR$(34) + "Pete is tremendous" + CHR$(34) Very easy to paste into a$ = " alt=" + CHR$(34) + "Pete is tremendous" + CHR$(34) Pete - My best amigo is my ego! RE: Html to QB64 Quote Converter - SMcNeill - 11-12-2024 Aye. I see what you're saying. I'm just saying a lot of times, I'm lazy. If I want to type: PRINT CHR$(34) + "Hello World" + CHR$(34) I'll just do a lazy: WordWrap "''Hello World''" And then the wordwrap function takes care of those double colons and converts them to quotes. It's just one of those quick and simple little coding style things which I've adjusted to over the years, getting used to the quirks of the BASIC language. |