Author Topic: ? re _MEM use - can one avoid using PRINT to access contents?  (Read 4930 times)

0 Members and 1 Guest are viewing this topic.

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
? re _MEM use - can one avoid using PRINT to access contents?
« on: January 16, 2021, 09:25:42 pm »
I notice that if one wants to "inspect" something in MEM block - examples always use PRINT.

Is it possible to directly load the MEM content into a variable - bypass the PRINT step?

FellippeHeitor

  • Guest
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #1 on: January 16, 2021, 09:26:47 pm »
Look up _MEMGET. Click it below to jump to the wiki article with example usage:
Code: QB64: [Select]

FellippeHeitor

  • Guest
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #2 on: January 16, 2021, 09:28:15 pm »
Also the function of same name: http://www.qb64.org/wiki/MEMGET_(function)

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #3 on: January 16, 2021, 09:57:06 pm »
@FellippeHeitor

Thanks

(I need more practice with MEM stuff - it is a very powerful and fast way of doing things)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #4 on: January 17, 2021, 03:47:27 am »
@FellippeHeitor

Thanks

(I need more practice with MEM stuff - it is a very powerful and fast way of doing things)

https://www.qb64.org/forum/index.php?topic=1731.0
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #5 on: January 17, 2021, 07:29:14 am »
@SMcNeill

Thanks for link (I forgot about it).

Anyone know of a way when YouTubing, to download to a file on my laptop. I am not connected on-line to the internet and rely greatly on "free public wifi" at silly times like 2am. Occasionally I use Mobile Cellular Data but typically video (or streaming) downloads is too expensive this way.

I anticipate that I will re-watch the videos a number of times to better appreciate the story about MEM related things.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #6 on: January 17, 2021, 08:17:29 am »
@SMcNeill
Anyone know of a way when YouTubing, to download to a file on my laptop.

Try the 4k downloader from here: https://www.4kdownload.com/

Using it since years for YouTube downloads without any hassle, and they are really quick in providing updates, if Google once again decided to change their YouTube Video API.
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #7 on: January 22, 2021, 02:28:48 am »
@RhoSigma

Thanks for link - which finally I was able to install/download - there were "funny" problems trying to do this, and it took about an hour (or longer) until the app was ready for business. THEN I discovered it was not free. Because I rarely do utubing (Steve's  MEM tutorials I think was my first (or second) time  wanting to watch/access Utube - I did not want to outlay money on something I may not use again (after downloading Steve's Mem video collection).

I ended up trying out a "free trial' screen recorder - and although "messy to operate" - think i did an "OK" recording representation of the Video with sound - and saved as a .AVI file (used VLC to watch). Any recommendations on other screen reccorders (preferably free) would be appreciated.

What I did not factor on was the length - I think video #3 is about 90 minutes long - so it took that long to download. So here I was in a public park using free public wifi starting my downloading just before midnight, with internet download interruptions (but auto recontinue) and when it came to video #3 download I was starting to fall asleep, being alerted by some skinny 600mm tall birds that wondered too close for my liking...

@SMcNeill  - just for fun - I tried the CC button (I think it stands for closed captions) - there were MANY typos (in video #3) - kept spelling bike for byte, hell for health, strength for string, Nadia Sara (what ever that is),etc - just bringing to your attention so you can edit sometime (maybe). By having the video as a file on my computer I can view many times, so I do not have to try to take detailed notes quickly. There is a high amount of what sounds like "crickets" in the background (louder than your voice in Video #3.... Putting the typos  (CC) aside it is probably the best way for me to get to understand MEM (thanks)

In the QB64 forum data base - any code available for simple editing of .AVI files?
« Last Edit: January 22, 2021, 02:30:06 am by Richard »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #8 on: January 22, 2021, 04:56:39 am »
How to download from youtube: https://www.wikihow.com/Download-YouTube-Videos

If you have VLC (as you mentioned), you can just use it to record youtube videoes.  The link above explains how.

As for the closed captions, those are auto-generated by youtube from a basic text to speech program.  And, like most text-to-speech apps, from my experience, they *really* don’t seem to like “Appalachian English”.  The mountain dialect where I’m from is a little too drawn out, slow, and unique for many of the T2S translators to properly comprehend.  https://en.wikipedia.org/wiki/Appalachian_English

If you want a true quality copy, let me know, and I’ll just up the originals to my onedrive folder when I get home this weekend, and share the link with you then.  AFAIK, there wasn’t any crickets involved with the recordings of those tutorials, but since I do live back in the country, nothing would surprise me.  If you said you saw a bear chasing a skunk eating a possum riding a chicken, I’d just say it was another Tuesday...
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #9 on: January 22, 2021, 05:05:42 am »
YouTube sucks, and it sucks, too. There are only a few browser addons that will successfully record their Google "owned" videos. If I was on my other computer, I'd look it up, Not sure if it was for Opera or Firefox, either.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #10 on: January 22, 2021, 06:10:57 am »
@SMcNeill

I would like to take up the offer for your quality originals.to download from your one drive folder link this weekend.

It is 9pm now in the public park where I am interneting from. I NOW NOTICE those "crickets" so what must have happen was with the free trial screen recorder, the laptop microphone was probably mixing in with the youtube stream. Probably also why those 600mm tall birds were getting pretty close to me (a free meal).

Thanks again

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #11 on: January 22, 2021, 08:28:52 am »
There's a neat commandline tool out there called youtube-dl.exe that grabs videos off youtube, "two-face" book, and other popular sites. It uses ffmpeg to encode them. It was written in purebasic, came with source code if i remember right.

- Dav

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #12 on: January 26, 2021, 01:33:24 pm »
@SMcNeill

I would like to take up the offer for your quality originals.to download from your one drive folder link this weekend.

It is 9pm now in the public park where I am interneting from. I NOW NOTICE those "crickets" so what must have happen was with the free trial screen recorder, the laptop microphone was probably mixing in with the youtube stream. Probably also why those 600mm tall birds were getting pretty close to me (a free meal).

Thanks again

Here you go Richard: https://1drv.ms/u/s!AknUrv8RXVYMmup2j57jzA768IajNA?e=XkyE7t

Sorry it took so long for me to get these up and available for you.  I didn't manage to make it home this weekend; my sister was having a whole new flooring put down in her place, and wasn't able to come take mom until late yesterday evening.  Since then, all I've been doing is just catching up on my sleep, and this evening is the first chance I've had to move files over to make them available. 

I hope everything's there, and I didn't miss anything for you.  Total size of videos come in at around 4.5GB or so, due their their native resolution and format, so make certain you have plenty of room and time before downloading them. 

Honestly, if you can stand to sit and watch them as I fumble my way though my explanations of the commands, I think they'll settle whatever questions and confusion you might have about how to work with _MEM in the future.  Just be warned -- I'm from the backwoods of the world, and we tend to have a naturally slow way of life here in Appalachia, and it bleeds over to everything we do -- including our speech.  I've had some folks complain that I "ought to learn to talk faster", but that's just not who I am.  I warn you in advance, some of the videos are about the length of a full movie, coming in at about 90 minutes or so, so be certain to grab some popcorn and soda before settling down to watch them for the night!!

And folks (mainly no one) wonder why I never get invited to be a key note speaker at any type of fancy functions....
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #13 on: January 26, 2021, 01:49:52 pm »
I may be viewing those vids of yours, soon; as I might be wanting to make use of those memory statements in QB64.

Hey I won't criticize your vids, if you don't tell anyone about how I blew my chance at being the "My Pillow" spokesman. I tried the product and loved it so much, that on the day of the commercial shoot, I overslept. That Lindel guy just decided to do the job himself. Oh well, at least i got,  "the best night's sleep ever."

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: ? re _MEM use - can one avoid using PRINT to access contents?
« Reply #14 on: February 19, 2021, 01:58:52 pm »
@SMcNeill

Thanks for link.

For some strange reason reply #11 and onwards never appeared for me UNTIL only one week ago (this funny behaviour was not unique to QB64 forums for me - it also occasionally happens with my emails (non-junk) where whole "pages" of listings just do not appear at all - maybe a MS thing.

So a few days ago, knowing in advance the size of the download, was able to obtain free wifi (at an acceptable speed) to download it all (without the crickets making a noise in the background of your videos).

Except for tutorial #1 - it makes a tremendous difference to see "razor sharp" text - comparing to the you-tube download and using a free trial screen recorder to record. No drama if tutorial #1 cannot be uploaded to the same quality level.

Thanks again