Jump to content
Sign in to follow this  
gcue

easter egg

Recommended Posts

gcue

hello folks.

i am trying to hide an easter egg in an application... you know a random animation or sound that will play if a combination of keys are pressed.

i am trying to use hotkeyset... (not working either)

HotKeySet("{LCTRL}+{RCTRL}", "Msg")

has anyone done this with good success?

thanks..

Share this post


Link to post
Share on other sites
Szhlopp

hello folks.

i am trying to hide an easter egg in an application... you know a random animation or sound that will play if a combination of keys are pressed.

i am trying to use hotkeyset... (not working either)

HotKeySet("{LCTRL}+{RCTRL}", "Msg")

has anyone done this with good success?

thanks..

Help file says you can't do two "{}"'s ;)

Sorry, you'll have to use "!" or "^" or "+" :D

Share this post


Link to post
Share on other sites
monoceres

Here's how I would do it:

#include <misc.au3>
$dll=DllOpen("user32.dll")
AdlibEnable("_EasterTime",25)

Do
    Sleep(100)
Until False

Func _EasterTime()
    If _IsPressed("A2",$dll) And _IsPressed("A3",$dll) Then
        MsgBox(0,"Gongrats!","You triggered the easter egg!")
    EndIf
EndFunc

;)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
gcue

cool that works!!

ill close the dll also ;)

Share this post


Link to post
Share on other sites
monoceres

cool that works!!

ill close the dll also ;)

You're welcome,

No need to close the dll really, but it doesn't hurt..


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
Richard Robertson

The problem with {LCTRL}+{RCTRL} is that you are listing two keystrokes instead of a proper key.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.