brucexs wrote:

> The only thing I wonder about is whether I should expand the 
> win.gettext function to do the things misplugin can do, for 
> completeness in the win plugin.

I vote for.

On a related issue which I never quite understood, I prefer 
miscplugin.get_windowtext over 
win.childtextbyindex because it seems to return more information.
For instance, take a look at the script below, when I use the 1st (commented 
below) inner loop I get less 
output than when I use the 2nd (uncommented below) inner loop. I don't know why 
that is the case.

local s
For(Local hi = 1; ; hi = hi + 1)
  Local h = Word(HandleList, hi)
  If(Not(h))
    Break

;;For(Local ControlIter = 1; ; ControlIter = ControlIter + 1)
;;Local ControlText = Win.ChildTextByIndex(h, ControlIter)
;;If(ControlText != "")
;;Win.Debug("   ", ControlIter ++ ".", ControlText)
;;If(_EOF_)
;;Break
;;EndFor

  ;; loop: read any text from all window controls
  ;; this loop retrieves more than the previous loop
  for(local i=1;i<100;i=i+1)
    local s=miscplugin.get_windowtext(h,i,"","win=all","sep=13")
    if("" != s && 0 == index(s,"NOT_FOUND"))
        win.debug("   ",i++".",s)
  endfor

EndFor
;; --- END ---



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