Jump to content


Photo

[game] You vs Windows


  • Please log in to reply
9 replies to this topic

#1 Frankie

Frankie
  • Members
  • 2930 posts

Posted 16 August 2011 - 02:31 AM

The title isn't talking about the operating system. You know those graphic user interfaces that you stretch and pull all day? Well, the're taking revenge. :twisted:

Try out this game, but make sure you have an Escape key on your keyboard in case you need to surrender.

Colors := ["cBlue", "cBlack", "cSilver", "cGray", "cWhite", "cMaroon"
, "cRed", "cPurple", "cFuchsia", "cGreen", "cLime", "cOlive", "cYellow"
, "cNavy", "cTeal", "cAqua"]

Fonts := ["Courier New", "MS Sans Serif", "Times New Roman", "Arial Bold"
, "Arial", "Courier New Bold Italic", "Verdana Bold", "Georgia Italic Impact"]

Distractions := ["Calc", "Notepad"]

chars := ""
loop, 200
    chars .= chr(A_Index + 32)
chars := RegExReplace(chars, "[^[:punct:]]")
Punct := []
loop, parse, chars
    Punct.Insert(A_LoopField)

Loop 16
{
    Gui, %A_Index%: Default
    RandomPunct := Punct[ Rand( Punct.MaxIndex() ) ]
    Gui, Font, % "s" Rand(25,30), % Fonts[ Rand( Fonts.MaxIndex() ) ]
    String := RandomPunct RandomPunct .  " Gui #" . A_Index " " RandomPunct RandomPunct
    Gui, Add, Text, % Colors[ Rand(16) ], %String%
    Gui, Show, % "x" Rand(A_ScreenWidth-300) " y" Rand(A_ScreenHeight-300), Close me`, I dare ya'
    Gui, +LabelEvilGui
}

Stack := {}
SetTimer, Reshow, 1500
SetTimer, Distract, 10000
return

Rand(min, max="") {
    if (max != "")
        Random, Rand, % Min, % Max
    else
        Random, Rand, 1, % Min
    return Rand
}

EvilGuiClose:
Gui, Cancel
Stack[A_Gui] := true
return

Reshow:
debug := ""
for key in stack
{
    if (A_Index = 16)
        Win()
    ToShow := key
}
if !ToShow
    return
Stack.Remove(ToShow)
Gui, %ToShow%: Show, % "x" Rand(A_ScreenWidth-300) " y" Rand(A_ScreenHeight-300)
return

distract:
R := Rand(4)
if Distractions.HasKey(R)
    run % Distractions[R]
return

Win() {
    Msgbox, 48, Congrats, You Win!
    ExitApp
}

esc::ExitApp

I'd like to note that I didn't spend a lot of time on this. Sorry the code is so messy :evil:

#2 TheDewd

TheDewd
  • Members
  • 823 posts

Posted 16 August 2011 - 03:06 AM

---------------------------

Project1.ahk

---------------------------

Error at line 1.



The following variable name contains an illegal character:

"["cBlue""



The program will exit.

---------------------------

OK   

---------------------------


#3 Frankie

Frankie
  • Members
  • 2930 posts

Posted 16 August 2011 - 03:49 AM

You're going to need AutoHotkey_L.

Here's an exe if you prefer that. EvilWindows.exe

#4 HotKeyIt

HotKeyIt
  • Fellows
  • 6119 posts

Posted 16 August 2011 - 04:11 AM

You could add Alt + F4 hotkey, otherwise I win :twisted:

#5 chrisj91

chrisj91
  • Members
  • 396 posts

Posted 16 August 2011 - 10:44 AM

What the freak . . . ??

This is cah - ray - zee . . . !!

Lol, it's well hard but strangely addicting 8) . . .

Good work Frankie, nice idea :D . . . !!

#6 TheDewd

TheDewd
  • Members
  • 823 posts

Posted 16 August 2011 - 07:24 PM

I started on trying to reproduce this, but using different methods. I became bored and gave up.

Here's how far I got:
#NoEnv
#SingleInstance Force

Loop, 200 {
	Random, RandomX, 0, %A_ScreenWidth%
	Random, RandomY, 0, %A_ScreenHeight%
	Gui, %A_Index%:Add, Text, w100, %A_Index%
	Sleep, 1500
	Gui, %A_Index%:Show, x%RandomX% y%RandomY%, %A_Index%
}
return


#7 R3gX

R3gX
  • Members
  • 307 posts

Posted 16 August 2011 - 07:41 PM

Soluce :
- Right-click on the tray icon
- click "Exit"

:lol: JOKE :lol:

Nice little game!!!

#8 nimda

nimda
  • Members
  • 4301 posts

Posted 16 August 2011 - 07:56 PM

Heh :lol: Pretty funny! I actually managed it, but it was pretty hard. :)

#9 Petru

Petru
  • Members
  • 236 posts

Posted 16 August 2011 - 08:42 PM

I managed it in less than a minute. 8)

#10 Frankie

Frankie
  • Members
  • 2930 posts

Posted 16 August 2011 - 10:00 PM

I got the idea when I was replying to this topic.

Thanks Weston for pointing that out. I really should make it clear that my code uses AutoHotkey_L, so I updated my sig.