Language AutoHotkey
(w/ Notepad)
Date: | 11/19/06 |
Author: | Jonny |
URL: | n/a |
Comments: | 1 |
Info: | http://www.autohotkey.com/ |
Score: | (2.82 in 11 votes) |
SetKeyDelay,0 Run,notepad WinWaitActive,Untitled - Notepad Loop 99 { Send,% 100-A_Index . " bottle" . IsPlural(A_Index) . " of beer on the wall,`n" . 100-A_Index . " bottle" . IsPlural(A_Index) . " of beer.`n" . "Take one down and pass it around,`n" . IsEnd(A_Index) . " bottle" . IsPlural(A_Index+1) . " of beer on the wall.`n`n" } Send,No more bottles of beer on the wall, no more bottles of beer.`n Send,Go to the store and buy some more, 99 bottles of beer on the wall. return IsPlural(iter) { If iter != 99 ReturnVal = s return ReturnVal } IsEnd(iter) { If iter = 99 ReturnVal = No more Else ReturnVal := 99 - iter return ReturnVal }
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
Boris Brodski said on 05/06/08 11:12:23
Great! You could improve your performance by using clipboard and pasting text into notepad