Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

small utilities

hello, i just wanted to mention a few utilities you can find at my "Downloads" page at http://www.billdawson.com

first, there's an API for the cityDesk db that I'm pretty sure most of you will not find useful because it's read-only.  i'm quite reluctant to make a utility that actually writes to the db, because God (and Joel) only knows what changes might popup in a future release, and i don't want to hear that someone has used the API to write and screwed everything up.  so anyway, this is a read-only api that was created mostly because i wanted to get at the structure (hierarchy) of a CityDesk site.  You'll find a better description, some code samples, and a complete API help system up there at my site.

then there are two things that actually use the API.  One, which I call a "floater", is a very, very simple and mundane window that can be set to "keep on top" and allow you to view your CityDesk site tree and drag and drop text from it (for instance, magic names).  for example when i work in external HTML editors, I often like to put magic names into the document I'm working on (like into templates, perhaps).  This thing hovers around while I'm working in HomeSite (or anything else), then I can just click on a tree node for my article and drag the magic name over to homesite and drop it.  you get the gist of it.

finally there is a JavaScript file (intended for Windows Script) that uses the API to generate an alpha list of all keywords used in the site, and underneath each keyword a link to each of the articles using the keyword. 

Again you find this at http://www.BillDawson.com under "Downloads".

best wishes,
bill dawson

bill dawson
Thursday, September 12, 2002

Cool!
I had a little trouble with the keyword-script. First I had to figure out I need to use wscript (scriptname) to start it.
Then I get this error at line 46, column 24 (valid name expected; in the kws.length statement. I don't know if the opening of the .cty file has been succesfull and if it was able to locate your API.

Adriaan van den Brand
Friday, September 13, 2002

You're right (and I should make this clearer), the JavaScript file is intended for WScript.  I have Windows Script Engine 5.6, and when I installed it it automatically associated .JS files to execute under WScript.  So I'm able to just double-click a JS file from the Explorer in order to get it to launch.

Re the problems you are having: do you happen to know your version of Windows Script Engine?  Try out a newer and much verbose copy of the script available at the exact same place on my site http://www.billdawson.com.  This newer version has much more exception handling and reporting and is highly-structured instead of being one long executing script.

To the best of my knowledge, "Valid Name Expected" is not a JavaScript runtime nor compilation time error message, so the message must be coming out of a call to something else.  Perhaps the API is sending the error message to JS, but since I know I don't have any error strings "Valid Name Expected", then the API would be getting the error from something that IT is calling.  These possibilities would include the MDAC components that are used, including the JET provider.

Let me know how it goes.
thx,
bill

bill dawson
Friday, September 13, 2002

Keywordlist works fine on my windows 2000 machine at home, but not under XP. I can only run it with the extension .wsf.

Line 108, character 18, "valid name expected" (translation from dutch) code 8004000A

Adriaan van den Brand
Monday, September 16, 2002

*  Recent Topics

*  Fog Creek Home