I am trying to write a function to bring focus to an application foo on some desk ‘A’, while being in another desk.
Here is my code:
+ I ToggleFoo “Foo”
+ I None ($$0, CirculateHit) Function MakeVisible
+ I TestRc (Match) Break
+ I Next ($$0, Circulate) Function MakeInvisible
+ I MoveToDesk
+ I MoveToPage
+ I MoveToScreen
+ I Raise
+ I Iconify off
+ I WindowShade off
+ I Iconify On
+ I WindowId root 1 WarpToWindow 50 50[/code]
Any comments would be appreciated.
This is where the use of pages, rather than desks is more useful, since everything you have below can be simplified to something like this:
+ I All ($0, CurrentDesk, !Iconic) FlipFocus
Which you can then use to call:
For instance. But as you can see, if they’re on different desks, then that takes more work.
Careful here. Whenever you have to use wildcards to specify a likely window name, consider matching on “class”, so that you avoid any ambiguities in other windows being matched unexpectedly. If you search these forums, you will see I have mentioned this many times.
– Thomas Adam