Hi Bill,
I run into that from time to time myself. A trick that sometimes works for me is to use my e-mail client to format the pasted text correctly. It doesn't work in all cases but has save some reformatting on occasions.
John
I use both IE (Internet Express) and Firefox. The reason is because of two sites, up to now. Now you are the third. The problem is saving a webpage that has a program on it, that using that page offline, later, to copy the code into an editor. In one of the other sites, the problem is with their wiki, the other one is the site itself. But, I'll explain the problem for this site.
When I save a page from this site, using firefox, that has code, and try and copy and paste later, it displays as one continuous line, for example:
Uses "console"Dim s,str1,rmv As String str1 = "She was a soul stripper. She took my heart!" rmv ="aei" s = Remove$(str1, Any rmv) PrintL s WaitKey
If I do the same, but use IE, it will display correctly, for example:
Uses "console"
Dim s,str1,rmv As String
str1 = "She was a soul stripper. She took my heart!"
rmv ="aei"
s = Remove$(str1, Any rmv)
PrintL s
WaitKey
The reason I just caught it for this site is that here I normally copy and paste while on line.
BTW The problem with firefox the other site's wiki is corrected with firefox by the GreaseMonkey add-on. IE copies and pastes the wiki as one line. Weird.
Any suggestions, other than telling me to go to hell?
Bill
P.S. It's just the code that this happens. I saved this page, copied and pasted the text just fine. Again, weird.
Last edited by Billbo; 22-04-2015 at 23:52.
Hi Bill,
I run into that from time to time myself. A trick that sometimes works for me is to use my e-mail client to format the pasted text correctly. It doesn't work in all cases but has save some reformatting on occasions.
John
John,
Thanks John. I'll give that a try.
Bill
Hi Bilbo,
thanks for letting us know about the issue. I never noticed it, as I use the following trick:
- hover your mouse over code in forum post
- hold CTRL and click (blue margin will appear)
- press CTRL+C and paste anywhere
Hope it helps,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
John and Petr,
Thanks for your suggestions. But, as I indicated, I wanted to be able to do it offline. Like using my laptop at the park on a nice sunny day. John, can't access you e-mail client offline. Petr, yes that works, but again, you have to be online to do that. Offline, you have to click and drag to highlight the code to copy. For now, I'll just stick with IE for the site.
Thanks, again, to you both.
Bill
Well, why not help this with a little ThinBASIC script, right?
Please use the script in the attachement to extract all code snippets from the downloaded page to separated TXT files...
Attached also 2 downloaded HTML files which I used for testing this solution.
Petr
EDIT: Attachement removed, re-attached in my post below
Last edited by Petr Schreiber; 24-04-2015 at 18:34.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
I just pop a new e-mail message (on my laptop), paste the code in the message area and once formatted I copy it it my text editor. Maybe I didn't explain that very well in my prior post.John, can't access you e-mail client offline.
John and Petr,
John; yes I understood your post. But, again, I cannot access my e-mail client offline and, therefore, cannot use your method. But, yes, it does work while on line.
Petr,
First off, I bundled your script and used it with your example htm's and it worked great. But! There are two to save a webpage and have a htm file. One is save as "Web Page, HTML only (*.htm, *.html)" and the other is "Web Page, complete (*.htm, *.html). I tried the first method on a page with code and get a "No snippets found0" popup. I tried the second method and it found five(5) snippets, but saved with gibberish in them. The page used is:
http://www.thinbasic.com/community/s...1913#post91913
Attached is a zip of the page and the five(5) snippets produced. Plus, there's a "Type .._ As.htm" saved by the first method for you to checkout.
Your little program is a great tool. I just need to get it work for me. Now, I haven't tried with an IE saved file yet. I'll let you know.
Thanks to you both,
Bill
P.S. I just checked it out after saving a page (the above) in both methods using IE. No good. This time, the first method worked but saved the files as 0 bytes in length. This time the second method gets the "No snippets found0" popup. Weird.
Last edited by Billbo; 24-04-2015 at 05:52.
Hi Bilbo,
my mistake, try this fixed version, produces correct output for me.
It now supports both versions of HTML saved by Firefox
Petr
EDIT: Attachement removed
Last edited by Petr Schreiber; 24-04-2015 at 20:44.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Petr,
I am sorry to say that it did not work correctly. I ran it on the enumerations page, again, and it only finds the first out of the five(5) snippets. Still doesn't find any on the "page only."
Bill
Bookmarks