Created
July 7, 2011 07:36
-
-
Save xnrghzjh/1069048 to your computer and use it in GitHub Desktop.
Groovyで色んなHelloWorld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// タイプ | |
"Hello World.".each() {print it; sleep(it==" "? 500:100);} | |
// Robot | |
r = { new java.awt.Robot().keyPress(it);sleep(100)}; l=[47,47,72,69,76,76,79,32,87,79,82,76,68] ;l.each(){r(it)} | |
// マップ withDefault()使用 | |
m=['h':'H','w':' W','k':'ld'].withDefault{it};doWork={it.split("\\.")[1].each(){print m[it]}}; doWork('https://www.hellowork.go.jp/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment