Hi Alan,

Alan Martin wrote  (on 16.08.2006 07:07):

> [A] ...
> IMHO all those options should be statics which are set in
> a separate @initialise routine at the end of the script.

You're definitely right. Well, since the script's still a draft, it's 
frequently changed, and once a varname is declared static, you can't 
change your mind back and make it local again, not until you quit PP. 
Thus, the coding is not clean ATM.



> [B] ...When the script starts, as early as possible we check whether
> the same script is currently running. If so, add this next
> handle to the queue and quit.

Will complicate things a bit but good idea.


> [C] You seem undecided about which window events to react to.
> Only a minimise event (create a new ThumbMinBar)

Unfortunately, one can't react to Minimize events (via 
HookWindowsEvents) because scripts in HookWindowEvents are called 
_after_ the minimization is done, which avoids the screencapturing 
naturally. Thus, all possible minimizations should be done using the 
main ThumbMin method.

Minimization using PP and Min-button can be changed easily but 
unfortunately I've no solution yet for catching/changing the 
minimization events using the Windows' own taskbar. Possibly, using 
Mousetrap and some area checking, it could be done.


> or also Close
> and Restore events (remove its ThumbMinBar).

You mean something different than the @ThumbMinCleanup method?



> Note: I see you start all your vars with _
> In the following script, I kept _var for locals,
> and used s_var for statics.
> ...

I'll integrate your code into my script.



> Before doing your screen shot, you make the target window ontop.
> After the screen capture you make it notontop.
> 
> I suggest this before the capture:
>   local _wastop = win.topmost(_handle)
>   win.ontop(_handle, 1)
> 
> and after the capture:
>   if(not _wastop)
>     win.ontop(_handle, 0)

Elegant. I'll take this as it is.


Alan, thank you for taking the time and analyzing my script :)

Peace,
Cü


Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to