% ' INFINITE MONKEYS ' ' liebevoll handgecodet vom Reo. ' nach einer idee vom guten Grenz. ' ' genauso liebevoll umgestellt auf asp ' vom fra. ' ' Spricht nur Englisch, die Sau. ' (Das Script, nicht der Grenz.) ' was suchen wir? das target. target=_ "The Lord is my shepherd, I shall not want. He maketh me to lie down in green pastures. He leadeth me beside the still waters. He restoreth my soul. He leadeth me in the paths of righteousness for his name's sake. Yea, though I walk through the valley of the shadow of death, I will fear no evil for thou art with me. Thy rod and thy staff they comfort me. Thou preparest a table before me in the presence of mine enemies. Thou anointest my head with oil; my cup runneth over. Surely goodness and mercy shall follow me all the days of my life, and I will dwell in the house of the Lord for ever." refresh = 10 ' refreshe die seite alle X sekunden. chars = 600 ' annahme : 600 affenanschläge die minute. randomize ' es lebe der zufall. test = "" ' das wird mit zufall angefüllt. tffound = 1 ' aktuell gefundene zeichen tfcount = 0 ' im zufall gefundene zeichen ' schau ma mal, was ma schon habn. Dim fs,f,linebuffer,comments Set fs=Server.CreateObject("Scripting.FileSystemObject") tfmax = 0 Set f=fs.OpenTextFile(Server.MapPath("tfmax.txt"), 1) ' open for read if f.AtEndOfStream = false then linebuffer = f.Readline tfmax = CInt(linebuffer) end if f.Close ' hier liegt die sogenannte mikunda-schleife, benannt nach dem grossen ' k. mikunda, der mich dazu gezwungen hat, sie zu schreiben. ' alles begann mit einer iascii-tabelle. for counter = 1 to chars z = Rnd 'Zufallszahl (liegt zwischen 0 und 1) char = Int(65 + (134 - 65 + 1) * z) select case char case 65 : char = "A" case 66 : char = "B" case 67 : char = "C" case 68 : char = "D" case 69 : char = "E" case 70 : char = "F" case 71 : char = "G" case 72 : char = "H" case 73 : char = "I" case 74 : char = "J" case 75 : char = "K" case 76 : char = "L" case 77 : char = "M" case 78 : char = "N" case 79 : char = "O" case 80 : char = "P" case 81 : char = "Q" case 82 : char = "R" case 83 : char = "S" case 84 : char = "T" case 85 : char = "U" case 86 : char = "V" case 87 : char = "W" case 88 : char = "X" case 89 : char = "Y" case 90 : char = "Z" case 91 : char = " " case 92 : char = "." case 93 : char = "," case 94 : char = ";" case 95 : char = "?" case 96 : char = "!" case 97 : char = "a" case 98 : char = "b" case 99 : char = "c" case 100 : char = "d" case 101 : char = "e" case 102 : char = "f" case 103 : char = "g" case 104 : char = "h" case 105 : char = "i" case 106 : char = "j" case 107 : char = "k" case 108 : char = "l" case 109 : char = "m" case 110 : char = "n" case 111 : char = "o" case 112 : char = "p" case 113 : char = "q" case 114 : char = "r" case 115 : char = "s" case 116 : char = "t" case 117 : char = "u" case 118 : char = "v" case 119 : char = "w" case 120 : char = "x" case 121 : char = "y" case 122 : char = "z" case 123 : char = "1" case 124 : char = "2" case 125 : char = "3" case 126 : char = "4" case 127 : char = "5" case 128 : char = "6" case 129 : char = "7" case 130 : char = "8" case 131 : char = "9" case 132 : char = "0" case 133 : char = Chr(35) case 134 : char = "'" end select ' na, dann prüf mal. if char = Mid(target,tffound,1) then if tffound = 1 then test = test & "" & char else test = test & char end if if tffound > tfcount then tfcount = tffound end if tffound = tffound + 1 else if tffound > 1 then test = test & "" & char else test = test & char end if tffound = 1 end if next ' neuer highscore? hooray! if tfcount > tfmax then set f = fs.OpenTextFile(Server.MapPath("tfmax.txt"), 2) ' open for write f.WriteLine(tffound) f.close end if ' der affe tippt seit 28.8.2005, daher stunden bis jetzt berechnen apetime = DateDiff("h","08/28/2005",Date) tries = Int((DateDiff("s","08/28/2005",Date) + Timer) / 10) ' alle 10 Sek. ein Versuch. ' brav sein, an die regeln halten. response.write("
") ' lad dich selber neu, wennst nix findest, landratte, konföderierte! if tffound < 594 then ' stopp, wenn affe psalm getippt hat. %> <% end if ' eine lustige titelzeile. %>