Function questions

I’m trying to understand FvwmScripting more and more, but I can’t always find good examples of what I want and then sit around for ages trying to get something to work. I’m wrestling with a Function now, basically what I want in the long run is a terminal that comes down from the top of the screen when the mouse touches it, or if a certain character is pressed.
I got this far, which opens a terminal from a button in the menu.

AddToFunc autohide
+ I ThisWindow ($0) Deschedule $[w.id]
+ I ThisWindow ($0) KeepRc ThisWindow (shaded) WindowShade off
+ I TestRc (!Match) All ($0, !shaded) autohide_hide $1 $2

AddToFunc autohide_hide
+ I Schedule $0 $[w.id] WindowShade $1
+ I Schedule $0 $[w.id] Deschedule $[w.id]

AddToFunc AutoConsole
+ I autohide AutoConsole 500 N
+ I Exec xterm -geometry 180x10+0+0

Style AutoConsole NoTitle, WindowListSkip, StaysOnBottom

however, the style doesn’t apply to the xterm, and it doesn’t autohide. Any tips on how I can create a function which opens a program and then can change the Style for only that instance of the terminal would be appreciated.
Thank you

-Dizz

[color=red]Edited by theBlackDragon:
-> Moved from Basic questions, might end up in Complex functions later on.[/color]

you should give your xterm the title AutoConsole, otherwise it can’t be able to work the way you’re tryin

I’m not sure if i completely understand how to go about that.

Use the name option:

xterm -name AutoConsole ...

By the way, taviso did this before. Have a look at:
http://dev.gentoo.org/~taviso/