Processing...

Started by George Vagenas, April 25, 2014, 11:53:56 PM

Previous topic - Next topic

George Vagenas

Code (winbatch) Select
      f00 = wingetactive()
      pause(`DEBUG PAUSE`, strCat(`fDir = `, f00))   ;***DEBUG LINE***
      if strindexnc(f00, 'powerdesk', 1, @fwdscan)
         fDir = filepath(itemextract(1, strtrim(itemextract(2, f00, '>')), '['))
      else   
         fDir = f00
      endif

This is a menu item from "FileMenu for all filetypes.mnw" which was failing, so I added the pause line to debug it.  f00 it turns out is "Processing...".  So I tried a loop:
Code (winbatch) Select
      while f00=='Processing...'
         f00 = wingetactive()
      endwhile

Which I had to Ctrl-Break to get out of.

Suggestions fixes much appreciated.  I'm on Win7x64 and I was running my favorite file manager Directory Opus so I switched to Explorer, just in case, but I had the same error.  I use wingetactive in popmenu for the same folder but there is no problem with it.
Thanks

George

Deana

What is your intent with this code? Generally the FileMenu tools is intended to work a specific file. When you right click on a file in the file explorer the active window would be the File Explorer itself?

Are you maybe looking for the last active window? Maybe give this a try: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Window~Manipulation+How~to~get~a~previously~active~window.txt
Deana F.
Technical Support
Wilson WindowWare Inc.

George Vagenas

Unfortunately, the 2nd window was not "Directory Opus" but a Toolbar window.  So I exported the code to a script and called it from FileMenu which didn't work,  still the "Processing..." error.  Next I tried running the script from FileMenu and it worked as expected.

Now that I think about it I should never have tried the call, a called script is essentially inline code and wouldn't avoid the problem that was causing the error.  Kudos!, Deana.
Thanks

George