--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> window opens.
> > 
> > If i check "Allow only one instance" in freecommander, whenever i press 
> > win+q, a new freecommander opens, immediatelly closes, and then the old 
> > freecommander window gets the focus (rather annoying:( )
> > 
> > Any idea?
> >
> 
> replace the "allow only one instance" by code based on ideas like the 
> following (using "more commands" data entry fields)
> 
> if (there is a freecommander window)
> 
> More commands
> window.show that window
> else
> run free command //eg using do command 
> 
> You would need to use, eg, the exec windowinfo command to find a reliable way 
> for detecting if freecommander is running by looking for a window matching a 
> window class or maybe =freecommander.exe or maybe a caption
>


I do the following (basically what Bruce said above). 

Entry in hotkeys.ini
---------------------
Key = W+Ctrl+e
;Cmd1 = .expxp
Cmd1 = .bringup("*- freeCommander", "d:\tools\freeCommander\freeCommander.exe")

bringup.powerpro (general script)
------------------------------------
Local m = arg(1)
Local n = arg(2)

;;win.debug (m,n)

    If        (visiblewindow (m)) do
              Window.Show(m)
    ElseIf    (anywindow (m)) do
              Window.Show(m)
    Else
              do (n)
    EndIf

Quit


Reply via email to