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 

Unix in 9 lines of AutoHotkey

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



Joined: 11 Aug 2004
Posts: 5248
Location: UK

PostPosted: Thu Mar 04, 2010 10:00 pm    Post subject: Unix in 9 lines of AutoHotkey Reply with quote

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
}

_________________
GitHubScriptsIronAHK Contact by email not private message.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fincs



Joined: 05 May 2007
Posts: 1160
Location: Seville, Spain

PostPosted: Thu Mar 04, 2010 10:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Fri Mar 05, 2010 12:28 am    Post subject: Re: Unix in 9 lines of AutoHotkey Reply with quote

LOL, no quit or exit?...just halt?
Back to top
Display posts from previous:   
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