Python
I guess it only works on Windows 7.
import win32api, win32con, win32gui
from time import time, sleep
import os
w = { 1:[(358, 263), (358, 262), (358, 261), (359, 261), (359, 262), (359, 264), (359, 266), (359, 270), (359, 282),
(358, 289), (357, 308), (356, 319), (355, 341), (355, 351), (355, 360), (355, 378), (355, 388), (354, 397),
(354, 406), (354, 422), (354, 428), (354, 436), (354, 438), (354, 439), (354, 440), (355, 440), (356, 439),
(357, 439), (358, 438), (360, 438), (362, 437), (369, 437), (372, 437), (381, 437), (386, 437), (391, 437),
(397, 436), (411, 436), (419, 435), (434, 435), (442, 435), (449, 434), (456, 434), (468, 434), (473, 435),
(480, 436), (483, 436), (485, 436), (487, 437), (488, 437), (488, 438), (488, 439), (487, 440), (486, 440),
(485, 440), (484, 440), (483, 439), (483, 437), (481, 431), (481, 427), (481, 420), (481, 413), (483, 396),
(485, 387), (488, 367), (491, 356), (493, 345), (500, 321), (503, 310), (507, 299), (514, 280), (517, 272),
(520, 266), (523, 260), (524, 258), (524, 259), (524, 261), (524, 265), (524, 269), (523, 275), (522, 289),
(521, 297), (518, 315), (516, 324), (515, 334), (513, 345), (509, 368), (507, 382), (502, 411), (500, 426),
(498, 440), (495, 453), (491, 478), (489, 491), (485, 517), (483, 530), (481, 542), (479, 552), (476, 570),
(475, 577), (474, 588), (473, 592), (473, 595), (473, 597), (473, 600), (473, 601), (473, 602), (473, 601),
(474, 599), (475, 597), (476, 594), (478, 587)],
2:[(632, 305), (634, 306), (636, 309), (639, 314), (641, 319), (645, 330), (647, 337), (649, 353), (649, 362),
(649, 372), (649, 384), (645, 409), (639, 436), (636, 448), (632, 459), (627, 470), (623, 479), (613, 497),
(608, 503), (599, 512), (595, 514), (591, 514), (587, 513), (581, 504), (578, 498), (576, 483), (575, 476),
(575, 469), (579, 454), (582, 447), (591, 436), (595, 432), (600, 430), (605, 429), (617, 432), (624, 437),
(639, 448), (646, 455), (654, 461), (662, 469), (679, 484), (686, 491), (702, 504), (710, 509), (718, 512),
(727, 514), (744, 515), (752, 515), (767, 512), (774, 510), (779, 508), (783, 505), (788, 499), (789, 495),
(789, 486)] }
def d( x1, y1, x2, y2 ):
win32api.SetCursorPos((x1, y1))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
win32api.SetCursorPos((x2, y2))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
sleep(0.01)
def p( l1 ):
l2 = [""]
l2.extend(l1)
l1.append("")
l3 = zip(l2, l1)
l3.pop(0)
l3.pop(-1)
for n in l3:
d(n[0][0], n[0][1], n[1][0], n[1][1])
os.startfile("C:\Windows\system32\mspaint.exe")
sleep(0.5)
win32gui.ShowWindow(win32gui.GetForegroundWindow(), win32con.SW_MAXIMIZE)
sleep(0.5)
for n in w:
p(w[n])
The result is opening Paint and painting 42 as free hand.
1A fortitudinous challenge.... – keshlam – 2014-02-23T06:23:49.547
@keshlam I guess...if one considers this challenge to be brave and courageous then yeah I guess it is :) – Milo – 2014-02-23T06:40:41.733
@keshlam I know I was just messing with you :) – Milo – 2014-02-23T06:50:53.127
6The old closed question was a code-trolling, i.e, anything that does not shows 42 beside appearing to do so or do it in a really horrible way. This one is not code-trolling, i.e. the output should really be 42 in a nice way. Hence it is not duplicate. – Victor Stafusa – 2014-02-23T22:59:17.593
1On any other SE site, this would be closed as "too broad". – Dan Dascalescu – 2014-02-23T23:38:08.750
2@DanDascalescu This SE site has many questions without strict requirements, which allows users to exercise creative freedom in their answers. Sometimes too many restrictions can impede the expression of creativity – grovesNL – 2014-02-24T00:45:51.330
9The question should remain at 42 votes. – Zero Fiber – 2014-02-24T03:47:59.090
2This question had just 42 answers! – bobbel – 2014-02-24T13:20:49.727
28Marvin The Robot "I would post my brilliant answer, but you would probably down vote it. Being right all the time is so depressing." – Reactgular – 2014-02-24T16:43:29.463
@SampritiPanda - too late! – TheDoctor – 2014-02-24T17:01:56.160
1Everybody un-upvote! – Zero Fiber – 2014-02-24T17:16:00.627
3Can we get 42 favorites? – Milo – 2014-02-24T22:48:54.477
@Milo: fav-count is at 42 now. :) – Aschratt – 2014-02-25T11:02:14.477
First dibs on audio! – Jason C – 2014-02-25T13:39:20.693
1@Aschratt Someone favourited past 42. Everyone unfavourite now to get down to 42! – Cruncher – 2014-02-25T19:21:24.177
@Cruncher What if you guys unfavored it to 42 then someone else unfavored it to 41? Or favored it back to 43? :P – John Odom – 2014-02-25T22:37:50.430
Make votes and favorites 42 and freeze the question. – Zero Fiber – 2014-02-26T04:13:36.307
@SampritiPanda I'm not sure questions can be frozen so solid as to prevent favouriting. Unless they are deleted. – Mr Lister – 2014-02-26T08:31:56.863
2Haha, I'm the 42nd person to earn the Civic Duty badge... and I got it by voting on this question! That's just perfect :D – Doorknob – 2014-03-02T23:06:37.013
42k views lol :D – Silviu Burcea – 2014-03-05T12:37:14.627
42 kviews, and the question above (the one about reversing an integer) has 42 answers... – Oberon – 2014-03-05T13:32:16.623
Pi! (314 votes) – Milo – 2014-07-13T07:27:33.573