ASL Editior 2005
francisstokes
14 May 2005, 14:16Ok.I've just started on my new VB project....an ASL Editor.
I plan to make it much like notepad, but with extras.
Such as:
say you start to make an "if" conditional,you write if and then it produces a drop down list of possibilites for the if statement like:
If here
%blah% = %blah%
NOT here
so on so forth.
Please let me know what you think.
I plan to make it much like notepad, but with extras.
Such as:
say you start to make an "if" conditional,you write if and then it produces a drop down list of possibilites for the if statement like:
If here
%blah% = %blah%
NOT here
so on so forth.
Please let me know what you think.
METALGod32
14 May 2005, 15:10sounds good to me, i say go for it.
007bond
14 May 2005, 23:28Good idea.
I remember computer whizz wrote an ASL editor which had built-in syntax checking as well, but that was at least a couple of years ago that he wrote it.
You might want to ask him for a bit of help
I remember computer whizz wrote an ASL editor which had built-in syntax checking as well, but that was at least a couple of years ago that he wrote it.
You might want to ask him for a bit of help
francisstokes
15 May 2005, 17:20I was hoping for help of computer whizz since hes the best programer on this site and i still a noob to VB.
I was thinking that for things like "define room" would be in green twxt when you type it and Things like that in specific text colours.
I was thinking that for things like "define room" would be in green twxt when you type it and Things like that in specific text colours.
francisstokes
15 May 2005, 19:10This is my FIRST version.It took me like 5 mins and it WILL get better.
http://www.geocities.com/francis.stokes14@btinternet.com/asleditor.zip
http://www.geocities.com/francis.stokes14@btinternet.com/asleditor.zip
francisstokes
16 May 2005, 15:52ok ive been testing my editor and already found 2 bugs.
Bug No. 1
While testing the editor on my laptop, i found saving the files saves the current file UNDER the rest of the file.I get this sort of effect:
Thats annoying.
Bug No. 2
When testing on my home computer, i found that saving the files does not do this, however, it does not save the file AT ALL.Also annoying.
Please let me know if you get any errors the same or *sigh* new ones.
Thanks
Bug No. 1
While testing the editor on my laptop, i found saving the files saves the current file UNDER the rest of the file.I get this sort of effect:
define game
blah blah
define game
blah blah
Thats annoying.
Bug No. 2
When testing on my home computer, i found that saving the files does not do this, however, it does not save the file AT ALL.Also annoying.
Please let me know if you get any errors the same or *sigh* new ones.
Thanks
Cryophile
16 May 2005, 20:03francisstokes
16 May 2005, 21:10Umm, thanks.
I'm not quite sure what you were trying to tell me with that but im hoping that it wasnt discouraging.
The main reason im doing this is because im a total noob to VB and just wanted to get some practise...so i thought why not make something to do with quest so thats what im doining.
I'm not quite sure what you were trying to tell me with that but im hoping that it wasnt discouraging.
The main reason im doing this is because im a total noob to VB and just wanted to get some practise...so i thought why not make something to do with quest so thats what im doining.
davidw
16 May 2005, 21:10Why not write a game?
007bond
16 May 2005, 22:05In answer ot your first bug:
When you open the file to save it, type:
Not:
By using the Output Method, it erases the file first, then writes to it again.
The append method simply adds to the end of the file.
When you open the file to save it, type:
Open "YourFileHere.asl" For Output As #1
Not:
Open "YourFileHere.asl" For Append As #1
By using the Output Method, it erases the file first, then writes to it again.
The append method simply adds to the end of the file.
francisstokes
16 May 2005, 22:19Why not write a game?
I could ask you the same question (joking).
I am in fact writing a game, but im trying to learn to program, C++ was too hard and asl is too easy so i thought id take the middle way.
Thanks 007 ill try that now.
francisstokes
16 May 2005, 22:25Ok 007 im actualy using this code:
Im using the .net version and the language has changed quite a bit.
Dim Save As New SaveFileDialog
Dim myStreamWriter As System.IO.StreamWriter
Save.Filter = "ASL Files (*.asl)|*.asl|Text Files (*.txt)|*.txt"
Save.CheckPathExists = True
Save.Title = "Save"
Save.ShowDialog(Me)
Try
myStreamWriter = System.IO.File.AppendText(Save.FileName)
myStreamWriter.Write(tbxEditor.Text)
myStreamWriter.Flush()
Catch ex As Exception
' Do Nothing
End Try
Im using the .net version and the language has changed quite a bit.
007bond
17 May 2005, 08:12Sorry, I thought you were using VB6. Anyhow, It's still easy to locate the problem:
You can't use "AppendText". It will add it on to the end of the file, not replace the entire file. I don't know the VB .NET way of doing this though, so good luck!
myStreamWriter = System.IO.File.AppendText(Save.FileName)
You can't use "AppendText". It will add it on to the end of the file, not replace the entire file. I don't know the VB .NET way of doing this though, so good luck!
francisstokes
17 May 2005, 15:31Looks like im gonna be doing some google crawling tonight.
Thanks anyway,
Thanks anyway,
007bond
18 May 2005, 06:22go to http://www.planet-source-code.com. That's always lots of help
francisstokes
20 May 2005, 15:10Ok.I found my solution.I had to
Now i have a new problem.The editor completely eats the code!It doesnt put any new lines in or anything.
CreateText
insted of AppendText
.Now i have a new problem.The editor completely eats the code!It doesnt put any new lines in or anything.
francisstokes
20 May 2005, 15:58Ok.Ive now fixed that error aswell.This is now a fully fuctional text editor.Now i just have to add some features that will make people want to use it.
download the current version here: http://www.geocities.com/francis.stokes14@btinternet.com/editor.zip
download the current version here: http://www.geocities.com/francis.stokes14@btinternet.com/editor.zip
paul_one
21 May 2005, 20:37My source code is available from my older website ( http://www.compwhizz.freeserve.co.uk/ ) I think.
Although it's been abandoned for the time being while I do other stuff.
Although it's been abandoned for the time being while I do other stuff.
francisstokes
22 May 2005, 22:17I downloaded your source tron.Were you trying to make the text go different colours for certain keywords like 'define'?
paul_one
23 May 2005, 12:38Trying? No.
I succeeded - although it was slightly slow, especially if you had a long list of different "keywords".
If I thought about it more I'd seperate them into different lengths of "words", track back to the space and go through that shorter list. If a string of 'words' are used (ie "define game" instead of "define text") then you use some sort of diverging algorythm to have "define" split off into two different scenario's and only colour it when the last bit is added.
... I just didn't care too much about it.
What I really wanted to get going was an easy object/room creator, a list of all objects/rooms, and stuff like that. Never got round to that either.
I succeeded - although it was slightly slow, especially if you had a long list of different "keywords".
If I thought about it more I'd seperate them into different lengths of "words", track back to the space and go through that shorter list. If a string of 'words' are used (ie "define game" instead of "define text") then you use some sort of diverging algorythm to have "define" split off into two different scenario's and only colour it when the last bit is added.
... I just didn't care too much about it.
What I really wanted to get going was an easy object/room creator, a list of all objects/rooms, and stuff like that. Never got round to that either.