Chavez
Joined: 20 Aug 2008 Posts: 153
|
Posted: Thu Sep 11, 2008 6:45 am Post subject: FloatCMD, simple yet useful. |
|
|
This is probable the most simple code ever to be created, but I'm still posting it, simply because i find it useful.
It's like the command prompt in a game, where you press Tilde to open it. In there, you can type commands (Example: cmd), a link to a website (Example: http://www.autohotkey.com), a directory (Example: %WINDIR%), or a program to start (Example: calc.exe).
| Code: |
SysGet, VirtualScreenWidth, 78
SysGet, VirtualScreenHeight, 79
Width = %VirtualScreenWidth%
EnvSub, Width, 2
Menu, Tray, Icon , %SystemRoot%\system32\SHELL32.dll, 25
Menu, Tray, NoStandard
Menu, Tray, Add, Exit, Exit
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow
Gui, Color, 000000
Gui, Font, CFF0900
Gui, Font,, System
Gui, Add, Edit, vtypedcommand h20 w%Width% xCenter y0 c000000
Active = 0
return
`::
if Active = 0
{
Gui, Show, xCenter y0 w%Width% h20
Active = 1
return
}
Else
{
Active = 0
Gui, Show, Hide
return
}
return
Enter::
if Active = 1
{
Gui, Submit, NoHide
Run, %typedcommand%
GuiControl, Text, typedcommand,
return
}
Else
{
Send {Enter}
}
return
exit:
exitapp
return |
I know, i know, it's kind of dodgy, but it works for me. Any suggestions, corrections or improvements are welcome of course!  _________________ -Chavez. |
|