The Dictionary . . . Again
Forum rules
Be kind.
Be kind.
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
Code sample window with colourisation.
Formatting code rejigged.
- Attachments
-
- Richard III 3.oxtstack
- (4.08 MiB) Downloaded 54 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
Probably the sensible thing, having displayed the code samples in a new field is to REMOVE them from the main window.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
Code removed as proposed in previous post.
- Attachments
-
- Richard III 4.oxtstack
- (4.07 MiB) Downloaded 44 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
To return to my first post in this thread; at least my Dictionary is displaying the information which the one I criticised was not:
- -
Now WHY it is NOT displayed in the one I criticised is interesting as ALL that my one does is display the text files and add a few fancy colours and so forth.
Maybe the other Dictionary is getting its information from somewhere else, or its text import routine is wonky.
Mind you:
- -
that return|returns is a load of old cobblers.
- -
Now WHY it is NOT displayed in the one I criticised is interesting as ALL that my one does is display the text files and add a few fancy colours and so forth.
Maybe the other Dictionary is getting its information from somewhere else, or its text import routine is wonky.
Mind you:
- -
that return|returns is a load of old cobblers.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
Blippety-Blippety-Boo:
viewtopic.php?t=1442
This refers to a modded version of my previous stack which I shall attach here.
viewtopic.php?t=1442
This refers to a modded version of my previous stack which I shall attach here.
- Attachments
-
- Richard III 5.oxtstack
- (4.08 MiB) Downloaded 32 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
The stack opens minimised like this:
- -
And "that purple thing" contains this script:
So, WHY does it take 2 mouse clicks to activate?
- -
And "that purple thing" contains this script:
Code: Select all
on mouseUp
set the lockScreen to true
set the width of this stack to 44
set the height of this stack to 50
put the right of stack "revMenuBar" into LEFF
set the left of this stack to LEFF
put the top of stack "revMenuBar" into TOPP
set the top of this stack to TOPP
set the vis of me to false
set the vis of img "expand" to true
set the label of this stack to " "
send "mouseUp" to btn "bFORMAT"
set the lockScreen to false
end mouseUp
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
The (hidden) button 'bFormat' (to see this set the width of the stack to 2500 pixels) contains the following script:
This should ensure that a whole slew of types are badged: but this is extremely inconsistent:
- -
For 'messageWithin' 'glossary' is both badged and coloured, while 'message' shows the holder glyph for the badge and is not coloured.
Watching activity, 'message' is both badged and coloured and then reverts.
Code: Select all
on mouseUp
put empty into fld "DICK"
--set the lockScreen to true
put fld "sTERM" into searchO
set the text of fld "DICK" to the searchO of btn "DataSTORE"
---
put fld "DICK" into DICKON
set the itemDelimiter to "Examples:"
put item 1 of DICKON into PARTONE
delete item 1 of DICKON
set the itemDelimiter to "Description:"
put item 2 of DICKON into PARTTWO
delete item 2 of DICKON
put DICKON into fld "KODE"
_internal script colorize char 1 to (the number of chars of fld "KODE") of fld "KODE"
put empty into fld "DICK"
put PARTONE & cr after fld "DICK"
put "Description:" & cr & PARTTWO after fld "DICK"
--put 1 into DIX
--repeat until DIX > 500
--if word DIX of fld "DICK" contains "|" then
--put word DIX of fld "DICK" into SQUIG
--set the itemDelimiter to "|"
--put item 2 of SQUIG into SQUOG
--put SQUIG && SQUOG
--replace word DIX of fld "DICK" with SQUOG in fld "DICK"
--repeat for each item MAGIC in SQUOG
--put wordoffset(MAGIC , fld "DICK") into WITCH
--set the textColor of word WITCH of fld "DICK" to blue
--end repeat
--set the textStyle of word DIX of fld "DICK" to link
--end if
--add 1 to DIX
--end repeat
---
put the number of chars in fld "DICK" into GLYPHS
----
if fld "DICK" contains "(function)" then
replace "(function)" with (cr & numToCodePoint(1126) && "function" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "function"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1126) then
set the imageSource of char CYCLE of fld "DICK" to 1015
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(property)" then
replace "(property)" with (cr & numToCodePoint(1127) && "property" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "property"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1127) then
set the imageSource of char CYCLE of fld "DICK" to 1190
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(message)" then
replace "(message)" with (cr & numToCodePoint(1128) && "message" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "message"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1128) then
set the imageSource of char CYCLE of fld "DICK" to 1209
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(glossary)" then
replace "(glossary)" with (cr & numToCodePoint(1129) && "glossary" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "glossary"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1129) then
set the imageSource of char CYCLE of fld "DICK" to 1225
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(control structure)" then
replace "(control structure)" with (cr & numToCodePoint(1130) && "control structure" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "control"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1130) then
set the imageSource of char CYCLE of fld "DICK" to 1304
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(object)" then
replace "(object)" with (cr & numToCodePoint(1131) && "object" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "object"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1131) then
set the imageSource of char CYCLE of fld "DICK" to 1320
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(command)" then
replace "(command)" with (cr & numToCodePoint(1132) && "command" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "command"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1132) then
set the imageSource of char CYCLE of fld "DICK" to 1363
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(constant)" then
replace "(constant)" with (cr & numToCodePoint(1133) && "constant" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "constant"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1133) then
set the imageSource of char CYCLE of fld "DICK" to 1365
end if
add 1 to CYCLE
end repeat
end if
----
if fld "DICK" contains "(keyword)" then
replace "(keyword)" with (cr & numToCodePoint(1134) && "keyword" & cr) in fld "DICK"
set the caseSensitive to true
repeat for each item MAGIC in "keyword"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
put 1 into CYCLE
repeat until CYCLE > GLYPHS
if char CYCLE of fld "DICK" = numToCodePoint(1134) then
set the imageSource of char CYCLE of fld "DICK" to 1369
end if
add 1 to CYCLE
end repeat
end if
----
----
if fld "DICK" contains "Syntax:" then
repeat for each item MAGIC in "Syntax:"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to green
end repeat
end if
----
if fld "DICK" contains "Synonyms:" then
repeat for each item MAGIC in "Synonyms:"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to blue
end repeat
end if
----
if fld "DICK" contains "----" then
repeat for each item MAGIC in "----"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to orange
end repeat
end if
----
if fld "DICK" contains "Params" then
repeat for each item MAGIC in "Params"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to purple
end repeat
end if
----
if fld "DICK" contains "Examples:" then
repeat for each item MAGIC in "Examples"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to red
end repeat
end if
----
if fld "DICK" contains "Description:" then
repeat for each item MAGIC in "Description"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to blue
end repeat
end if
----
if fld "DICK" contains "Values:" then
repeat for each item MAGIC in "Values"
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to orange
end repeat
end if
----
put the htmlText of field "DICK" into DICKY
replace "----" with "<font color=" & quote & "orange" & quote & ">----</font>" in DICKY
set the htmlText of fld "DICK" to DICKY
----
put word 1 of fld "DICK" into DUMA
if fld "DICK" contains DUMA then
repeat for each item MAGIC in DUMA
put wordoffset(MAGIC , fld "DICK") into WITCH
set the textColor of word WITCH of fld "DICK" to orange
set the textSize of word WITCH of fld "DICK" to 36
end repeat
end if
set the lockScreen to false
end mouseUp
- -
For 'messageWithin' 'glossary' is both badged and coloured, while 'message' shows the holder glyph for the badge and is not coloured.
Watching activity, 'message' is both badged and coloured and then reverts.

https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
I will produce a version that does NOT assume you have a 'fekkin monster' of a display like my iMac Retina 27 inch thang offers once THAT problem mentioned above is solved (but I cannot, for the life of me, workout why it does not behave).
- -
AND, parenthetically, if you think Austin Powers' teeth are de trôp you should see my solid gold bridge going across 4 teeth.

- -
AND, parenthetically, if you think Austin Powers' teeth are de trôp you should see my solid gold bridge going across 4 teeth.

https://richmondmathewson.owlstown.net/
-
- Posts: 130
- Joined: Sat Oct 16, 2021 5:05 pm
- Contact:
Re: The Dictionary . . . Again
Making resizable would be appreciated. I couldn't work out the revert problem either.
You seem determined to colorize and badge, consider an option for neither. Maybe strip out type (like 'command', 'function') from fld "XList". Code examples in a separate field seem unnecessary. Just offering suggestions. Terry
You seem determined to colorize and badge, consider an option for neither. Maybe strip out type (like 'command', 'function') from fld "XList". Code examples in a separate field seem unnecessary. Just offering suggestions. Terry
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
The code examples are only in a separate field as I am unable to colourise them in the msin field.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
So:
- -
Here's a 'something' to edit the Dictionary text files, and THEN export them as date-stamped versions.
Just for the sake of illustration, here's what spits out on my computer:
- -
So I'll add that to the list in that particular text document:
-
- -
Here's a 'something' to edit the Dictionary text files, and THEN export them as date-stamped versions.
Just for the sake of illustration, here's what
Code: Select all
put the machine
- -
So I'll add that to the list in that particular text document:
-
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
Exporting this gives me a document called:
machine function 4-23-25.txt
[Because MacOS at least does not like '/' in file names I have changed those for '-' signs]
To keep the North Americans happy (cough, cough) I have retained the American date format.
The date stamped file is saved in the folder the stack resides in.
-
machine function 4-23-25.txt
[Because MacOS at least does not like '/' in file names I have changed those for '-' signs]
To keep the North Americans happy (cough, cough) I have retained the American date format.

Code: Select all
on mouseup
set itemDel to "/"
set the defaultfolder to item 1 to -2 of (the effective fileName of this stack)
put the date into XDATE
set the itemDelimiter to "/"
put item 1 of XDATE into X1
put item 2 of XDATE into X2
put item 3 of XDATE into X3
put X1 & "-" & X2 & "-" & X3 into XXX
put fld "DICK" into GUFF
put GUFF into url("file:" & fld "ZZZ" && XXX & ".txt")
end mouseup
-
- Attachments
-
- Dictionary Editor 1.oxtstack
- (4.06 MiB) Downloaded 25 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
- richmond62
- Posts: 5226
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: The Dictionary . . . Again
Thanks to Klaus Major this may be marginally more efficient:
Code: Select all
on mouseUp
set itemDel to "/"
set the defaultfolder to item 1 to -2 of (the effective fileName of this stack)
put the date into XDATE
set the itemDelimiter to "/"
replace "/" with "-" in XDATE
put fld "DICK" into GUFF
put GUFF into url("file:" & fld "ZZZ" && XDATE & ".txt")
end mouseUp
- Attachments
-
- Dictionary Editor 2.oxtstack
- (4.13 MiB) Downloaded 10 times
https://richmondmathewson.owlstown.net/
Who is online
Users browsing this forum: richmond62 and 1 guest