Attach file
#1
Would it be possible (or practical) to place an Attach File icon at the top of the thread page, maybe next to the Code icon? I know (now) that this is provided at the very bottom, but this is so far down the page that it's hard to find... at least for me, anyway.  Smile
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Reply
#2
From the info given on my other query, "open .bas files only", it seems that I don't need to use "Attach file" at all - they can be attached with the $include, is that correct? I'll have a look at that, thanks, @jack
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Reply
#3
I am not sure what you mean by Attach file and I can't think of a simple example to illustrate, let's say that you have some sub's and functions that you want to use in other programs, then you can put all those functions and sub's in a file with a .bm extension and if those functions need some type declarations or some shared variables you would put the declarations in a file with .bi extension, then to use your library you would do something like the following
Code: (Select All)
'$include: 'mylib.bi'
' your program here
'$include: 'mylib.bm'
Reply
#4
(11-18-2022, 12:40 AM)Jack Wrote: I am not sure what you mean by Attach file and I can't think of a simple example to illustrate, let's say that you have some sub's and functions that you want to use in other programs, then you can put all those functions and sub's in a file with a .bm extension and if those functions need some type declarations or some shared variables you would put the declarations in a file with .bi extension, then to use your library you would do something like the following
Code: (Select All)
'$include: 'mylib.bi'
' your program here
'$include: 'mylib.bm'
I was referring to attaching a file, such as a text file (in my case a word-list), and to do this using .bi and .bm seems like a bit of overkill. I just want the file to be available to the prog I attach it to. Isn't that what the field at the bottom of the screen is used for? It seems to do everything I need, but it's a bit "invisible" down at the bottom of the screen. Confused
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Reply
#5
You could put your BASIC program and the text file (and others such as images and music) together into a single ZIP file which would then become the attachment to this forum. There's no other good way to combine BASIC code with a text file or with anything else which is not another source code file via "'$INCLUDE".

Where the attachment stuff is placed is the style of the forum, because the user would either have to create a file by dragon drop, or would like to see what he/she had given as attachments in the past. I agree that "Thread Subscription" is worthless for most users and should be allowed hidden, and a few other things below the text entry field so that it's easier to access the attachment stuff without having to scroll down a lot.
Reply
#6
I think that I have seen a way to attach binary data to an executable, was it PureBasic?
you could make those text files as data statements and include them or instead of data statements assignments to an array
Reply
#7
(11-18-2022, 01:51 PM)Jack Wrote: I think that I have seen a way to attach binary data to an executable, was it PureBasic?
you could make those text files as data statements and include them or instead of data statements assignments to an array

Just copy it to the end of the executable.  It's probably the simplest and easiest way.  Wink
Reply
#8
A bit impractical when the data is the whole of the Collins dictionary, but.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Reply
#9
Could probably do something with the resource file and have it embed that information to be called back later.
Ask me about Windows API and maybe some Linux stuff
Reply
#10
I think PhilOfPerth is talking about attaching a file here in a reply.

Minerva's advice is best IMHO, seek wisdom and understanding Smile

I think Phil has it figured out see here: https://staging.qb64phoenix.com/showthre...6#pid10376

File properly attached!
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)