AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FloatCMD, simple yet useful.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Chavez



Joined: 20 Aug 2008
Posts: 153

PostPosted: Thu Sep 11, 2008 6:45 am    Post subject: FloatCMD, simple yet useful. Reply with quote

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! Smile
_________________
-Chavez.
Back to top
View user's profile Send private message MSN Messenger
IsNull



Joined: 10 May 2007
Posts: 112
Location: .switzerland

PostPosted: Thu Sep 11, 2008 11:23 am    Post subject: Reply with quote

whats the difference to the build-in [win]+[r]?
_________________
http://securityvision.ch
Back to top
View user's profile Send private message
Chavez



Joined: 20 Aug 2008
Posts: 153

PostPosted: Thu Sep 11, 2008 12:37 pm    Post subject: Reply with quote

IsNull wrote:
whats the difference to the build-in [win]+[r]?


I find this easier and handier.
_________________
-Chavez.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group