ZTree.com  | ZTreeWiki  | ZEN  | ZEST  | About...  

 Index   Back

[Notice] ZBar Script Host ZAAP   [Notice]

By: Martijn Coppoolse   Homepage   Voorburg, NL  
Date: Apr 02,2009 at 04:40
In Response to: [Notice] ZBar Script Host ZAAP (Ian Binnie)

> I gave this a try, and it seems like a good idea, as it makes it
> possible to script with ZAAP without building the message loop etc.

Something which is a bit of a pain in many scripting languages.

> It is rather slow (3:05 for 2478 files). Part of this is in ZTreeWin,
> but there would be a contribution in the host. This is fast enough for
> manual operations, but not Ctrl-Y. I normally poll my ZAAP at
> 100-250mSec, which is human reaction time.
>
> My latest development detects the start of a Ctrl-Y, and drops polling
> to 3mSec.

I do the same thing; it detects the start of a Ctrl-Y, but only drops to 50 milliHz (seeing as that's about the resolution of the VB Timer Control). Hence the slowness, I think.

Yes, it's written in Visual Basic 6 — still the easiest way to write simple COM objects for me. I'd like to port the whole thing to Delphi some day, if only to figure out how to expose my own objects to a scripting environment. Besides, the host is starting to become so complex that I'm running into the limitations of an IDE that hasn't been updated in 10 years.

> The Ctrl-Assist command only needs to be compiled once, then it can be
> applied for the rest of the sequence. It also helps to minimise screen
> updating.

I'm already doing the compile-once-execute-more, but locking screen updating is a bit tricky in VB. I've been working on the assumption that in normal circumstances, the script host would usually be minimized anyway.

> This presumably relies on the RegEx in Javascript. I don't know this,
> and if people were going to use any beyond the basics would need a
> pointer to the documentation.

Good point. It does, since this script is written in Javascript. I'll include a link to the MSDN page in that script, and in the documentation.

> I have about 4 versions of grep, all having different RegEx
> conventions.

Yes, it's a pain. Almost every editor I've used that supports regular expressions has a slightly different feature set, and almost always a few different escape characters. Same goes for the different libraries. In that light, I'll be glad if ZTreeWin uses PCRE.


--
Martijn

375 views      
Thread locked
 

Messages in this Thread

 
82,796 Postings in 10,445 Threads, 196 registered users, 20 users online (3 registered, 17 guests)
Index | Admin contact |   Forum Time: Sep 9, 2010 - 5:30 pm CDT  |  Hits:5,288,832  (2,797 Today )
RSS Feed