>> If I use win.show("Bar",2), as suggested in your earlier email, it 
>> works as advertised.  But win.showna("Bar") does nothing here: I bump 
>> the top of the screen (the hotkey trigger) but nothing happens,
> 

Try the attached script by Ted Wall. It's never failed on me.
I think it was uploaded to the file section of the yahoo group.
I didn't write it, I can't answer questions about it, but do let us know if it 
helps.

You should call it as
.ShowNA(cl.getbarhandle("Bar"))

--sgp

------- ShowNa.powerpro ------
--- watch out for folded lines ---

; .ShowNA(Handle_Caption_or_Classname)  eg. .ShowNA("PowerPro Debug")

; Run from explorer's tiny run box:
; ?"pathTo\PowerPro.exe" .ShowNA(Handle_Caption_or_Classname)
; "%ProgramFiles%\PowerPro\PowerPro.exe" .ShowNA("PowerPro Debug")

; Handle_Caption_or_Classname same as for:
;   Window *command + Specifying the windowID for the *Window command in 
powerpro help

; @ShowNA
; arg(1)= cl as in win.txt
; Makes sure a window is showing, and tries to make not active
   ARGS hThis

   hThis= IfElse(ASSIGN("hThis", WIN.Handle(REPLACECHARS(hThis, "," , ",,"))), 
hThis, ;;+
      If(NOT arg(1), WIN.Handle("active")))

   IF(NOT hThis)DO
      hThis= ?#Unable to find "#++ arg(1)++ ??"?
      EVENT.Message(5, "", hThis, "."++ scriptname, 1)
      QUIT
   ENDIF

   LOCAL hAct= WIN.Handle("active")
   LOCAL bTopMost= WIN.Topmost(hThis)

   ; Just letting windows do its thing if called other WIN.Show stuff
   WAIT.For(100)
   IF(hAct == hThis)DO
      WINDOW.Back_(hThis)
      WAIT.For(2000, hThis!=(ASSIGN("hAct", WIN.Handle("active"))+0) && hAct)
      WAIT.For(200)
   ENDIF

   IF(NOT bTopMost || NOT WIN.Visible(hThis) || WIN.Minned(hThis))DO
      WIN.Show(hThis)
      IF(bTopMost)DO
         WAIT.For(500, hThis == WIN.Handle("active")+0)
         WIN.Show(hAct)
      ELSE
         WIN.OnTop(hThis,1)
         WIN.Show(hAct)
         WAIT.For(500, hAct == WIN.Handle("active")+0)
         WIN.OnTop(hThis,0)
      ENDIF
   ELSEIF(bTopMost && hThis!=WORD(WIN.Handlelist("*",1),1)+0)
      WIN.OnTop(hThis,0)
      WIN.OnTop(hThis,1)
      IF(NOT WIN.Topmost(hAct))
         WIN.Show(hAct)
   ENDIF

   QUIT


; Author: Ted Wall 1-May-2006


Reply via email to