Home | Reviews | GUIpedia | Forum | Fun500


agumaFAR OS 3
Would anyone like to help me with FAR OS 3? I got a scripting language and stuff, but I haven't implemented it yet cause my dad took my laptop to China. :angry: Well, here's an example program: WIN 50,50,300,300,"Hello World!" #PAINT: DRAWWIN PRINT 20,20,"This is a test program.",15 LABEL: GOTO LABEL If you would like to help me, just ask. -Andrew
2008-07-196:03 PM

BrandonRe:FAR OS 3
Your dad took your laptop? What do you need help with?
2008-07-197:47 PM

agumaRe:FAR OS 3
well, i haven't started yet!
2008-07-198:52 PM

agumaRe:FAR OS 3
okay, i started the scripting engine but there's a bit of a problem. Does anybody know how to get rid of all the quotes in a string?
2008-07-215:23 PM

BrandonRe:FAR OS 3
What? CHR(34) Is a quote.
2008-07-215:25 PM

agumaRe:FAR OS 3
well yeah but for some reason FUNCTION GetLine$ DO UNTIL l$ = CHR$(255) l$ = MID$(ProgData(CurrentProg), Programs(CurrentProg).dp, 1) s$ = s$ + l$ Programs(CurrentProg).dp = Programs(CurrentProg).dp + 1 LOOP s$ = LEFT$(s$, LEN(s$) - 1) DO UNTIL NOT INSTR(s$, CHR$(34)) MID$(s$, INSTR(s$, CHR$(34)), 1) = "" LOOP GetLine$ = s$ END FUNCTION doesn't work.
2008-07-215:27 PM

ksrRe:FAR OS 3
[b]aguma wrote:[/b] [quote]okay, i started the scripting engine but there's a bit of a problem. Does anybody know how to get rid of all the quotes in a string?[/quote] Is this upon input? Use 'LINE INPUT string' instead of 'INPUT string'.
2008-07-215:29 PM

agumaRe:FAR OS 3
Well it gets the entire program and saves into an array like this: [Line 1] CHR$(255) [Line 2] CHR$(255) And I get one line at a time. If I have something like "Hello" it works fine, but if I have something like PRINT "Hello" Where the quote begins at the middle of the string, then it doesn't 'de-quote' it. Sorry if you didn't understand that, but it's sorta hard to explain.
2008-07-215:31 PM

ksrRe:FAR OS 3
[b]aguma wrote:[/b] [quote][code]MID$(s$, INSTR(s$, CHR$(34)), 1) = "" [/code][/quote] Is this line supposed to remove the speech marks? AFAIK you can't use MID$ like that - you would have to concatenate the part of the string on each side of the quote. EDIT: Here is some (FreeBASIC) code that will do what I think you want to do. [code]dim as string astring dim as integer stringpos astring = "Text, " + chr(34) + "more text" + chr(34) + " and even more text" print astring for stringpos = 1 to len(astring) if mid(astring, stringpos, 1) = chr(34) then 'concatenate astring = left(astring, stringpos - 1) + right(astring, len(astring) - stringpos) end if next print astring sleep [/code]
2008-07-215:42 PM

agumaRe:FAR OS 3
I just changed it to something like that before you said it, but thx for the code.
2008-07-215:52 PM

ToddRe:FAR OS 3
It's too bad QB doesn't work like PHP or C++ with quotes: "I can make "quotes" like this." lol
2008-07-216:16 PM

agumaRe:FAR OS 3
wow, it's already alive and it's only been a few hours! This is the quickest working version yet! Well, only the scripting engine as of yet. :laugh:
2008-07-216:17 PM

ToddRe:FAR OS 3
Progress counts.
2008-07-216:21 PM

agumaRe:FAR OS 3
FINALLY! After hours of struggle, I can now make a program that... ...adds two numbers. Whee. All it can do is add. But, as you said, progress is progress, and this is at least going somewhere, instead of being trashed. Yay!
2008-07-216:38 PM

BrandonRe:FAR OS 3
Don't forget the Team Cool stuff.
2008-07-216:40 PM

agumaRe:FAR OS 3
yeah, i'm working on a bitmap viewer. wait...is there a bitmap viewing function?
2008-07-216:42 PM

BrandonRe:FAR OS 3
ok. Did you check out how to make a theme? Its easy.
2008-07-216:44 PM

agumaRe:FAR OS 3
i think i can figure it out.
2008-07-216:45 PM

GUIs


2021 Brandon Cornell