BBC BASIC for Windows
« Automatically opening a TEXTEDIT.BBC file »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:43pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Automatically opening a TEXTEDIT.BBC file  (Read 708 times)
Danny72
New Member
Image


member is offline

Avatar




PM


Posts: 20
xx Re: Automatically opening a TEXTEDIT.BBC file
« Reply #4 on: Sep 7th, 2010, 2:56pm »

Thanks for the message.


I'm really struggling to understand what it is that I should literally put into the TEXTEDIT program. I have tried experimenting with the information given but cannot get anywhere.

Is it

PRINT "'"@cmd$"'"

just before the Main Loop

thanks
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Automatically opening a TEXTEDIT.BBC file
« Reply #5 on: Sep 7th, 2010, 5:38pm »

on Sep 7th, 2010, 2:56pm, Danny72 wrote:
Is it PRINT "'"@cmd$"'" just before the Main Loop

At that point in the TEXTEDIT program the 'output window' is completely covered by the edit control. Therefore a PRINT statement inserted into the program, for debugging purposes, won't have a visible effect (it will be hidden behind the edit control)!

If you want to add a debugging line to your program I would suggest using a Message Box; that will display in front of the edit control so you will be able to see it:

Code:
      SYS "MessageBox", Hedit%, @cmd$, "Debug", 0 
What this will show you is that @cmd$ contains the command-line parameter(s), if any, passed to your compiled program.

The main alteration that you will need to make to the TEXTEDIT program is to split PROCload into two parts: the part that prompts the user to select a file (which you want to bypass) and the part that actually loads the file (which you want to keep). Hopefully you can see how to do that.

Richard.
User IP Logged

JonR
New Member
Image


member is offline

Avatar




PM


Posts: 24
xx Re: Automatically opening a TEXTEDIT.BBC file
« Reply #6 on: Sep 7th, 2010, 5:49pm »

When you compiled the test program and ran it passing a filename to the program what did you see?

Unfortunately adding the PRINT statement to TEXTEDIT.BBC program might not be useful as the printed text will likely be coevered by the edit control. You want to set the window title to the file name and load the file without opening the open file dialog box. Everything you need can be adapted from the appropriate procedure(s) in the code.

I'd prefer if possible not to give you the exact solution to this problem, I'd rather you wrote the code.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls