Page 1 of 1

Getting a text file into Smart Basic IPad

Posted: Fri Feb 16, 2018 5:58 pm
by Tffsnyder
Oh my Lord I love Smart Basic. Most programming problems I can solve by looking at other programs. Here is where I am stuck. My program wants to read data in from a text file that I have generated outside the program in a text editor. I saved that to the appropriate file in dropbox and I can find it using the Dropbox feature in smart BASIC, but it won’t let me paste a text file locally.

Help!

Tom Snyder

Re: Getting a text file into Smart Basic IPad

Posted: Fri Feb 16, 2018 6:22 pm
by rbytes
It is good to see new users on the Forum. Those of us who have been here for a while will be happy to help you any time. I just answered a very similar question to yours. If any time you are in a hurry and can't wait for someone to reply, just do a word search to see if your question has been answered for another user.

Smart Basic uses Dropbox as an "in-between" stage to move files in and out. Apple will not allow Smart Basic or any other programming app to use code to load or run a file from Dropbox. Therefore you need to use the Copy, Cut or Paste tools in Smart Basic to import the file.

1. Simply toggle your SB Dropbox icon until you see the heading "Dropbox" on your screen.
2. Find the file you placed in the Apps/Smart Basic folder.
3. Select it, then Copy or Cut it.
4. Toggle the Dropbox icon until you see Smart Basic as the screen header.
5. Paste your file wherever you want it (eg. you can navigate into a folder before pasting.)

You cannot Paste files into SB from Dropbox with the extender .txt, but once they are pasted into Smart Basic you can rename them.

Re: Getting a text file into Smart Basic IPad

Posted: Fri Feb 16, 2018 6:42 pm
by Tffsnyder
Hi. I was so excited to see a reply so quickly. Thank you.

Yes I have been trying to use the copy and paste method from Dropbox to smart BASIC and I noticed that it won’t except a file with .txt extension. Since I am trying to send a text file with that extension, can I use any other extension to get it in there and then rename it later?

Re: Getting a text file into Smart Basic IPad

Posted: Fri Feb 16, 2018 6:44 pm
by rbytes
Absolutely. Dropbox allows renaming of files, so change the extender to anything except .txt, then once you copy it and paste it into Smart Basic, change the name back. There is a Rename icon at the bottom of the SB interface.

Re: Getting a text file into Smart Basic IPad

Posted: Fri Feb 16, 2018 6:47 pm
by rbytes
Why the prohibition on .txt? That is because Smart Basic uses that default extender for program files. Quite a while ago I discovered that almost any extender works on a program file. All of my programs use the extender .sb

So if I need to copy them between Dropbox and Smart Basic I do not encounter the restriction.