To address this shortcoming I have written a small utility which converts
the supplied HTML files into a CHM (Compiled HTML Help) which opens in
Microsoft's HTML Help Viewer. This provides a Table of Contents, an
Alphabetical Index and a Full Text Search. My utility can be found here
(it is 'digitally signed' to give you confidence that it is safe to run):
http://www.rtr.myzen.co.uk/makelb4chm.exe
The utility automatically performs the steps necessary to create the CHM
file, including if necessary installing Microsoft's 'HTML Help Workshop'
application. It also creates shortcuts to the CHM on the Desktop and in
the Start Menu.
Because the generated CHM file contains a compressed version of the HTML
files which are part of your Liberty Basic installation, it is governed by
the same Copyright restrictions and Licensing Terms as those HTML files.
In particular it may not be distributed or otherwise made available to
anybody else.
Richard.
http://www.rtrussell.co.uk/
I dont see why you do that and what is main point of this app?
Maby you want atract some people from LB to use BBC?
The application has nothing to do with BBC BASIC (its Help has used
CHM from the start, so doesn't require any similar utility). It is
more likely to attract people *to* Liberty Basic than *from* it!
Richard.
http:www.rtrussell.co.uk/
Good man, Richard! That will be useful. Thanks!
Cheers
Derek
Don't think of LB vs BBC (vs anything else) as some sort of competition. Even
though they're both commercial BASICs, the idea is to provide a language that
does what the programmer wants, in a way that the programmer is comfortable
with. (If they make a buck while doing so, hey, more power to them.)
--
When you talk to a woman about sex it's sexual harassment,
but when they talk to you about sex it's $2.99 a minute.
Hear hear! I wrote the utility because (a) it was needed, (b) I had the
necessary skills and (c) it was an interesting programming exercise. Just
because my main allegiance is to BBC BASIC that doesn't mean I am
*against* Liberty Basic; if the utility attracts a few more people to LB
good luck to them.
Some Liberty Basic folks just don't seem to be able to grasp this. My
'reward' for writing the utility has been to be ejected from the Liberty
Basic Programming Wiki, banned from the Liberty Basic Community Forum and
having all my articles/posts - including those about the utility - deleted!
Perhaps it's a uniquely British thing _not_ to be aggressively competitive.
Richard.
http://www.rtrussell.co.uk/
> On Thu, 12 May 2011 16:15:28 +0100, Auric__ <not.m...@email.address>
> wrote:
>> Don't think of LB vs BBC (vs anything else) as some sort of competition.
>
> Hear hear! I wrote the utility because (a) it was needed, (b) I had the
> necessary skills and (c) it was an interesting programming exercise. Just
> because my main allegiance is to BBC BASIC that doesn't mean I am
> *against* Liberty Basic; if the utility attracts a few more people to LB
> good luck to them.
>
> Some Liberty Basic folks just don't seem to be able to grasp this. My
> 'reward' for writing the utility has been to be ejected from the Liberty
> Basic Programming Wiki, banned from the Liberty Basic Community Forum and
> having all my articles/posts - including those about the utility - deleted!
That's... weird. Maybe they think you're trying to "muscle in" on their
"territory"...?
> Perhaps it's a uniquely British thing _not_ to be aggressively competitive.
More likely it's the American tendency to be a bunch of paranoid self-serving
privileged "the world owes me a living" assholes.
--
Does it worry you that you don't talk any kind of sense?
Possibly. I suspect there was a large element of 'not invented here'
syndrome.
To be fair it was mostly one person who seemed to take great exception to
my utility (although, strangely, they were initially enthusiastic and
encouraged me to write it).
Richard.
http://www.rtrussell.co.uk/
> On Thu, 12 May 2011 18:30:15 +0100, Auric__ <not.m...@email.address>
> wrote:
>> That's... weird. Maybe they think you're trying to "muscle in" on their
>> "territory"...?
>
> Possibly. I suspect there was a large element of 'not invented here'
> syndrome.
...sigh.
I think it's a good idea, although I personally won't be using it. (Perhaps a
more general-purpose tool, but... shrug. My docs tend to be plain text. I
grabbed a copy for my archives, but the odds of me using it are very, very
slim. About as slim as me using LB for anything "serious".)
They'd probably be happier if you wrote it in LB and released the code to
their forums... if you could log in, that is...
> To be fair it was mostly one person who seemed to take great exception to
> my utility (although, strangely, they were initially enthusiastic and
> encouraged me to write it).
If you got banned, that one person must've had some clout.
--
Whatever you used to translate this should be shot.
Undoubtedly. Unfortunately it would be impossible to write it in LB,
because the program uses COM methods to read the target from a .LNK file
(that's how it finds out where Liberty Basic and HTML Help Workshop are
installed) and also to create the shortcuts to the CHM on the Desktop and
in the Start Menu.
AIUI, Liberty Basic cannot access methods in COM objects at all. That
means it is limited to the older C-style Windows APIs, which cover a wide
range of things but not manipulating shortcuts.
Richard.
http://www.rtrussell.co.uk/
I don't know a lot about LB but would this work (properly ported that is)?
HRESULT STDMETHODCALLTYPE GetPath(
IShellLink FAR *pShlLnk,
LPSTR pszFile,
int cchMaxPath,
WIN32_FIND_DATA *pfd,
DWORD fFlags
);
Parameters
pShlLnk
Pointer to the IShellLink interface. In C++, this parameter is implicit.
pszFile
Pointer to a buffer that receives the path and filename of the shell link
object.
cchMaxPath
Maximum number of bytes to copy to the buffer pointed to by pszFile.
pfd
Pointer to a WIN32_FIND_DATA structure that contains information about the
shell link object.
fFlags
Flags that specify the type of path information to retrieve. This parameter
can be a combination of the following values:
SLGP_SHORTPATH Retrieves the standard short (8.3) filename.
SLGP_UNCPRIORITY Retrieves the Universal Naming Convention (UNC) path name
of the file.
Return Values
Returns NOERROR if successful or an OLE-defined error value otherwise.
--
HK
That's exactly the API I am using in my utility. However you list it as
if it's a regular C-style API function called 'GetPath' when in fact it's
a COM object method 'IShellLink::GetPath' which therefore cannot be called
from Liberty Basic:
http://msdn.microsoft.com/en-us/library/bb774944.aspx
There *is* a regular API function called GetPath, but it's totally
different (it's a graphics function and nothing to do with shortcuts):
http://msdn.microsoft.com/en-us/library/dd144908.aspx
Richard.
http://www.rtrussell.co.uk/
Okay, I got this from the API docs I use for PureBasic programming, but
have never had the need to use it. Pure doesn't really do COM very well
either but there are libs available to ease the use. Thanks for the info,
sorry I butted in.
--
HK
I can hardly claim that BBC BASIC does COM 'well'. It's a bit of a hack
involving using a structure to represent the object's vTable and then
pointing the structure at the object. But there's a world of difference
between being able to do it in a slightly inelegant way (e.g. BBC BASIC)
and not being able to do it at all (e.g. Liberty Basic).
Richard.
http://www.rtrussell.co.uk/
Minor suggestion: if the user decides to not install the workshop, add "press
any key to exit" (or similar) after showing the download link.
--
I VOTE WE JUST LIVE FOREVER THIS DEATH THING SUCKS
Why is not published on Liberty Basic forum?
That's a good idea. I've modified it to display the same 'Click on Close
or press Alt-F4 to close this window' message that it displays on
successful completion:
http://www.rtr.myzen.co.uk/makelb4chm.exe
Richard.
http://www.rtrussell.co.uk/
They won't let me! There was an article describing it (with a link to the
download) on the LB Programming Wiki for a few days, until it was
deleted. On two occasions I tried to post messages to the LB Community
Forum, but they 'disappeared' within minutes.
I have re-posted the Wiki article here instead:
http://lb4help.wikispaces.com/
The LB folks claim to be concerned that the existence of my utility may
act as a deterrent to people entering the Help Search Challenge which they
are currently running (the idea of which is to write a program in LB to
search the HTML help files). Personally I think that's just an excuse; if
it's a genuine reason they should let me publicize my utility once the
challenge is closed. But of course I won't be able to do that because I'm
banned!
Richard.
http://www.rtrussell.co.uk/
quote:
<< banned! >> ?????
I can't belive....you made utility to improove help and then you
banned...
Ge o mine....
This people are scare himself and scared from someone else knowlege
thats for sure..
By the way LB is such a poor written language with low capabilities...
I sometimes what people see in JB/LB ????????????????
---edit:
I sometimes dont understand what people see in JB/LB ????
And im surprized why im not banned yet....becose im author of another
basic-like language,maby becose i do post very small number of post.
By the way what to post?????
There are mostly kids with baby questions...
i think that most of mods on LB forum are to paranoid...
They're holding a "challenge" to write a search engine in LB?
Anyway, ignoring whatever language you wrote your util in (I assume BBC but
it doesn't matter), I'd say you won the challenge. :-)
--
Get off me!
> On May 14, 2:00 pm, aury <aurelw....@gmail.com> wrote:
>> On May 14, 1:57 pm, aury <aurelw....@gmail.com> wrote:
[big ol' snip]
>> > << banned! >> ?????
>> > I can't belive....you made utility to improove help and then you
>> > banned...
>> > Ge o mine....
>> > This people are scare himself and scared from someone else knowlege
>> > thats for sure..
>> > By the way LB is such a poor written language with low
>> > capabilities... I sometimes what people see in JB/LB ????????????????
>>
>> ---edit:
>> I sometimes dont understand what people see in JB/LB ????
There's quite a lot that it can do. See Rosetta Code's LB page for a list of
tasks that have been done in LB:
http://rosettacode.org/wiki/Category:Liberty_BASIC
To summarize, 90 RC tasks have been done specifically in LB. They range from
simple things (like the classic "Hello world") to things like the Knuth
(Fisher-Yates) shuffle, roots of quadratic functions, MD5, the Ackermann
function, etc.
> And im surprized why im not banned yet....becose im author of another
> basic-like language,maby becose i do post very small number of post.
> By the way what to post?????
> There are mostly kids with baby questions...
> i think that most of mods on LB forum are to paranoid...
LB markets itself (at least in part) as a language that's good for beginning
programmers (people with no prior experience programming), so it's no
surprise that the forums are full of beginners' questions.
--
The debate rages on.
(Good sigmonster!)
That's rather a strange site. Although somebody (not me) has created a
category page for BBC BASIC it doesn't appear in the (automatically
generated) main Languages page:
http://rosettacode.org/wiki/Category:Programming_Languages
http://rosettacode.org/wiki/Category:BBC_BASIC
So nobody is likely to find BBC BASIC there because it isn't indexed.
Richard.
http://www.rtrussell.co.uk/
A world of difference to be sure. I haven't needed it all that much, once
to do some Excel automation, but that is about all I recall at the moment.
Still, if you need it, as in your case, you'd be stuck if it isn't
supported, even if it is less than elegant.
--
HK
FYI, .... there are 9 entries for the challenge to write a LB program
to search the LB Helpfiles. I'm not sure, but if guests may vote at
the poll, maybe even you can still vote. Your entry is not there.
I'm sorry to hear that you're banned, but you knew the TOS.
A Liberty BASIC version of your program is now also available.
I know that you could have write your listing easily in Liberty BASIC,
because you are a very good Liberty BASIC programmer too.
The advantage of having an LB version of your program is that
the LB user can now connect that listing to Liberty BASIC and place
it in the RUN menu. We can run (couple) an external program in our
LB if it's written in LB. So, now we have 9 different Search Help
programs and one written in your way (CHM). Thanks anyway for
pointing out that possibility to me.
If only you had written your program in LB and not sending a BCC listing
agains the TOS and maybe deliberately frustrating the on going challenge.
Gordon.
p.s.
All other readers,
Every now and then, Richard is pointing out the fact that LB can't
acces COM in the way he feels it should.
Maybe it will in the future....
"Richard Russell" <ne...@rtrussell.co.uk> schreef in bericht
news:op.vvgsl2epn5ksl5@richard...
Your facts are wrong. My 'Liberty Basic CHM creator' program was *not*
written to be an entry in the Help Search Challenge, since the rules had
already been changed to say that only programs written in LB were
admissible. Also, it is *not* a "BCC listing" (do you mean a "BBC
listing"?), it is a compiled executable program. The language in which it
was written is irrelevant and not stated.
For those who don't yet know about it here is the page on the LB Wiki:
http://basic.wikispaces.com/Creating+a+CHM+version+of+the+Help+files
> A Liberty BASIC version of your program is now also available.
Where?
> I know that you could have write your listing easily in Liberty BASIC,
No, I could *not* have written it in Liberty Basic. The program makes use
of COM object methods to discover where Liberty Basic is installed and
also to create the shortcuts in the Start Menu and on the Desktop.
Liberty Basic cannot access COM methods.
> Every now and then, Richard is pointing out the fact that LB can't
> acces COM in the way he feels it should.
> Maybe it will in the future....
Liberty Basic 5 (which *may* support COM, but we don't know) was announced
in 2005. Actually the first reference to it I can find is in this post
from June 2004:
http://groups.yahoo.com/group/libertybasic/message/21552
During the last *six years* complaints about the shortcomings of Liberty
Basic have been met with the response 'these problems will be fixed in
Liberty Basic 5'. We are still waiting!
Richard.
http://www.rtrussell.co.uk/
http://alycesrestaurant.com/lb4chm.htm
Liberty BASIC 5 is not available yet. Carl is still working on it.
In the meantime we got Run BASIC and Liberty BASIC 4.04
and maybe we will get v4.05 first (LB with COM? who knows).
Maybe we should start another challenge at the forum?
"Write a Liberty BASIC program to automate the process of
compiling HTML help files with the help of the Microsoft program
for compiling to their CHM system"
I'm sure you would complete that job, because I know you can.
Gordon
> On Thu, 02 Jun 2011 21:22:10 +0100, Gordon Rahman <gra...@planet.nl>
> wrote:
>
>> I know that you could have write your listing easily in Liberty BASIC,
>
> No, I could *not* have written it in Liberty Basic. The program makes use
> of COM object methods to discover where Liberty Basic is installed and
> also to create the shortcuts in the Start Menu and on the Desktop.
> Liberty Basic cannot access COM methods.
It occurs to me that, rather than using COM to find the LB install, you could
simply ask the user where it is. Perhaps bring up the Windows "browse for
folder" dialog, something like:
lpBI.Title = "Please indicate where Liberty Basic is installed."
lpBI.Flags = BIF_RETURNONLYFSDIRS
CALLDLL #shell32, "SHBrowseForFolder", lpBI As BROWSEINFO, result as Long
(...and then tell them they're morons if they don't actually point you at the
right directory.)
--
I prefer to give them the Death of a Thousand Paper Cuts.
Well, yes, but when I said I couldn't write it in Liberty Basic I meant I
couldn't write a program with identical functionality.
Irrespective of issues of functionality, why would I want to write
anything in Liberty Basic? It's a language I don't know as well as some
others, and it's a language I don't like. And don't get me started about
the bugs, or how slow it is, or the monstrous executables!
If Liberty Basic users are so 'protectionist' that they won't run a
utility - however useful it might be - unless it's written in LB, I'm
afraid I am not inclined to pander to them.
Richard.
http://www.rtrussell.co.uk/
> On Sun, 05 Jun 2011 18:18:50 +0100, Auric__ <not.m...@email.address>
> wrote:
>> It occurs to me that, rather than using COM to find the LB install, you
>> could simply ask the user where it is.
>
> Well, yes, but when I said I couldn't write it in Liberty Basic I meant I
> couldn't write a program with identical functionality.
Ok. I wasn't thinking about it that way.
> Irrespective of issues of functionality, why would I want to write
> anything in Liberty Basic? It's a language I don't know as well as some
> others, and it's a language I don't like. And don't get me started about
> the bugs, or how slow it is, or the monstrous executables!
I don't use LB so I can't speak for the bugs or the large exe's (although I
believe that LB compiles to bytecode, so what you're probably seeing would be
the bytecode attached to an interpreter... I *think*), but not liking the
language is perhaps the best reason to avoid it.
(As far as size goes, REALbasic takes the cake, I think. An empty program
compiles to a 1.73mb exe.)
> If Liberty Basic users are so 'protectionist' that they won't run a
> utility - however useful it might be - unless it's written in LB, I'm
> afraid I am not inclined to pander to them.
As you said before, it's probably a case of "not written here" syndrome.
--
Immortality is only a word. All that exists can die.
Every living thing has a weapon against which it has no defense.
Time. Disease. Iron. Guilt.
I've just tried creating a 'Hello, world!' executable using Liberty Basic
4.04. What it's produced is ten files in all: one .EXE, one .TKN, five
.DLLs and three .SLLs; the total size of all the files is about 2.8
Mbytes. Compressing them results in a 1.2 Mbyte ZIP.
So whether you consider that to be bigger or smaller than your RealBasic
example rather depends on whether the RealBasic EXE was compressed or not.
One of the many things I dislike about LB is that it doesn't create
single-file EXEs, you have to distribute all those custom DLLs and SLLs
with every compiled program. It almost forces you to use an installer to
deploy even the simplest application.
Richard.
http://www.rtrussell.co.uk/
RR