| View previous topic :: View next topic |
| Author |
Message |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Aug 31, 2002 12:07 am Post subject: Rich Text Support |
|
|
I'd like some rich text edit boxes so we can do things like underline, bold, bullets,...
And a spellcheker too!
Serge _________________
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Aug 31, 2002 8:21 am Post subject: |
|
|
Well, a spell checker isn't too hard to make. Make a program that uses a PARSE command (with a @chr(32)) and compare te words with a list with words.
Word list:
Hello
Halo
Hall
Hill
Hull
Typed:
Hllo
Then search for parts of the typed word (Hll or llo) and check if that is in the Word list. If so, make a pop-up or something so you can choose.
Btw. there already is a dll for Rich editting text, vdsobj.dll |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Aug 31, 2002 9:00 am Post subject: |
|
|
Thanks for that Skit3000 - i'll chase it up!
Serge _________________
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Aug 31, 2002 7:52 pm Post subject: |
|
|
Here is a basic Spell checker program: (It works like I explained before)
| Code: |
DIALOG CREATE,Spell checker,-1,0,541,253
DIALOG ADD,EDIT,TEXT,22,20,318,182,hllo hwo are you tody in ameriiica,MULTI,WRAP,SCROLL
DIALOG ADD,BUTTON,BUTTON1,210,18,64,24,Spellcheck
DIALOG ADD,BUTTON,BUTTON2,180,344,180,24,No suggestion
DIALOG ADD,LIST,SUGGESTIONS,36,344,180,138,SORTED,CLICK
DIALOG ADD,TEXT,word,22,346
DIALOG ADD,MENU,-,ENTER|ENTER
DIALOG SHOW
list add,SUGGESTIONS
list create,1
list loadtext,1,sorted
"
"hello
"america
"hi
"hill
"hull
"how
"who
"ho
"tod
"toady
"today
"todd
:evloop
wait event
%%event = @event()
goto %%event
:Button1button
%%text = @trim(@dlgtext(TEXT))
option fieldsep,@chr(32)
%%chr32pos = @pos(@chr(32))
:spellcheckloop
parse "%%word",%%text
dialog set,word,%%word
%%text = @strdel(%%text,1,@succ(@len(%%word)))
list seek,1,0
list seek,SUGGESTIONS,0
if @equal(@item(SUGGESTIONS,0))
list delete,SUGGESTIONS
end
%z = 0
repeat
if @match(1,@substr(%%word,%z,@fadd(%z,2)))
if @not(@match(SUGGESTIONS,@item(1)))
list add,suggestions,@item(1)
end
end
%z = @succ(%z)
until @equal(%z,@len(%%word))
%z = 0
repeat
if @match(1,@substr(%%word,%z,@fadd(%z,2)))
if @not(@match(SUGGESTIONS,@item(1)))
list add,suggestions,@item(1)
end
end
%z = @succ(%z)
until @equal(%z,@len(%%word))
%z = 0
repeat
if @match(1,@substr(%%word,%z,@fadd(%z,2)))
if @not(@match(SUGGESTIONS,@item(1)))
list add,suggestions,@item(1)
end
end
%z = @succ(%z)
until @equal(%z,@len(%%word))
%z = 0
repeat
if @match(1,@substr(%%word,%z,@fadd(%z,2)))
if @not(@match(SUGGESTIONS,@item(1)))
list add,suggestions,@item(1)
end
end
%z = @succ(%z)
until @equal(%z,@len(%%word))
%z = 0
repeat
if @match(1,@substr(%%word,%z,@fadd(%z,2)))
if @not(@match(SUGGESTIONS,@item(1)))
list add,suggestions,@item(1)
end
end
%z = @succ(%z)
until @equal(%z,@len(%%word))
wait event
%%event = @event()
if @equal(%%event,SUGGESTIONSCLICK)
%%newtext = %%newtext @item(SUGGESTIONS)
dialog set,text,@trim(%%newtext %%text)
list clear,SUGGESTIONS
list add,SUGGESTIONS
if @not(@null(%%text))
goto spellcheckloop
end
end
if @equal(%%event,Button2button)
%%newtext = %%newtext %%word
dialog set,text,@trim(%%newtext %%text)
list clear,SUGGESTIONS
list add,SUGGESTIONS
if @not(@null(%%text))
goto spellcheckloop
end
end
%%text =
%%newtext =
%%word =
goto evloop
:Button2button
rem Only works if the spell-checker is activated...
goto evloop
:Entermenu
warn "This is disable. Make the script to work with @cr()@chr(10)"
goto evloop
:Close
exit |
Last edited by Skit3000 on Wed May 28, 2003 7:59 pm; edited 1 time in total |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sat Aug 31, 2002 11:23 pm Post subject: |
|
|
wow...skit3000! thanks a bunch for all the work you put into this.
I'll be adding that feature to the program i wanted a spellchecker for.
Thanks again
Serge _________________
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Sep 01, 2002 10:44 am Post subject: |
|
|
No thanks, I was thinking about making a Spell checker a long time. Now I had a good reason...
Btw. It wasn't so hard to make, only 30/45 minutes. |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Sun Sep 01, 2002 2:46 pm Post subject: |
|
|
| You can use richedit boxes with VDSOBJ.DLL if i'm not wrong |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Sep 01, 2002 3:09 pm Post subject: |
|
|
I already told that, Protected. (See second post)  |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Mon Sep 02, 2002 1:54 pm Post subject: |
|
|
thanks for your suggestion Protected
Serge _________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|