 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Thu Mar 04, 2010 10:00 pm Post subject: Unix in 9 lines of AutoHotkey |
|
|
Because AutoHotkey is better than Ruby.
| Code: | DllCall("AllocConsole")
DllCall("SetConsoleTitle", "Str", uname := "ahkunix 1.0")
FileAppend, You have no mail., con
While l != "halt"
{
FileAppend, `n$%A_Space%, con
FileReadLine, l, con, 1
FileAppend, % l == "uname" ? uname : "command not found", con
} |
_________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1160 Location: Seville, Spain
|
Posted: Thu Mar 04, 2010 10:10 pm Post subject: |
|
|
My little modification to this funny script:
| Code: | DllCall("AllocConsole")
DllCall("SetConsoleTitle", "str", uname := "ahkunix 1.1`n")
FileAppend, You have no mail.`n`n, con
while l != "halt"
{
FileAppend, %A_UserName%@%A_ComputerName% ~$%A_Space%, con
FileReadLine, l, con, 1
FileAppend, % l == "uname" ? uname : ((l != "halt" && l != "") ? "command not found`n" : ""), con
} |
_________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list] |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 05, 2010 12:28 am Post subject: Re: Unix in 9 lines of AutoHotkey |
|
|
| LOL, no quit or exit?...just halt? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|