On 27 Aug 2004 11:36:14 -0400, Nicholas Harknett wrote:
>
> Does anybody know how I can do the following? In an FvwmScript, which
> I have already wrote, I want create an if statement to check the status
> of a window. For example, I would like to check whether it is iconified, focused, brought forward (etc.) I know how to use these properties as
> conditions in an All command or the likes, but I was wondering how to
> refer to these properties and how to compare them to a window name, in an FvwmScript.
> The reason I am trying to do this, is I would like, when I click on a
> button, I would like to check the status of a window with a certain name,
> and then if it is iconified, I would like to DeIconify it and fbring it
> forward and focus it. If it does not exist, run a command, and if it does
> exist and is not iconified, iconify it.
> I hope somebody can just help me to get started with a conditional check
> on the status, as I belive I can do the rest with little to no trouble.
If I understand you correctly, this has nothing to do with FvwmScript.
Create a function or several sub-functions (if needed) to do the work.
Then bind it to a titlebar button, or maybe FvwmScript/FvwmForm action.
The function may do something like this in 2.5.x:
+ I Next (Mozilla) Nop
+ I TestRc (!Match) Exec mozilla
+ I TestRc (Match) ThisWindow (Iconified) Iconify off
+ I TestRc (!Match) Iconify on
Or any other if-else construction. You get the idea.
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Aug 28 2004 - 18:43:32 BST