Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Desktop Existing Window Question
i'm running VirtuaWin to manage multiple desktops on my machine. when i start up a certian database i have a "watcher" function start up and tell me if it is still open in so many minutes. if however, the db is closed (ie "ifi-"), it stops the timer and ends itself.

the trouble comes when i switch desktops and the function does a ifi- and doesnt find that db window so it closes even though the db is open on another desktop. I tried getting the process id but when the db initially opens but because i may have several db open at once i cant be certain of getting the right one. i also thought of setting a global variable triggered on the destruction of the db window but that wont trigger if the process is killed via the Task Manager from a desktop other than the one the db is on.

any ideas on how i can do this? the process id seems the way to go if i can get it.

An old blog on QM coding and automation.

The Macro Hook
Are you sure it is related to multiple desktops? When VirtuaWin switches desktops, it moves windows 25000 pixels down and activates a window on the new desktop. ifi still finds windows on the old desktop.

Store window handles into global array and then repeatedly call IsWindow (instead of ifi).
i checked it again with a short timeout and when i open it the timer kicks off and when i switch desktops it does the ifi- and executes that "if" loop and end the watcher function (which is what it does when i close the db and while staying on the same desktop).
An old blog on QM coding and automation.

The Macro Hook
Now I tested other window. It was hidden when in inactive desktop. To find hidden windows, use class name.

ifi- win("name" "class")

Forum Jump:

Users browsing this thread: 1 Guest(s)