Triggering Events with Key Presses
Posted: Fri May 14, 2004 4:07 pm
First off, just wanted to say you guys have done great work on the CHM manual. I love it. Much cleaner and easier to use than the old HTML version on the site or TXT version. On to my question:
If I wanted to end a macro by simply hitting <ENTER> or such ... is that possible? Example:
In the following, I want to put something saying "If the <ENTER> key is pressed, /endmacro" somewhere in the :BeepLoop. Sure, you can just type in /endmacro manually, but I was looking for something cleaner. Is that possible?
Thanks in advance for any help you guys can provide. Much appreciated.
If I wanted to end a macro by simply hitting <ENTER> or such ... is that possible? Example:
Code: Select all
|=============================================================================
|------------------------------- Tell Alert v1.0 ------------------------------
|--------------------------- Audio /tell Notification ------------------------
|-----------------------------------------------------------------------------
|--- Usage: /macro Tell
|--- Spouts out a series of beeps when you've recieved a tell. Handy
|--- for being AFK while LFG for example.
|-----------------------------------------------------------------------------
|--- By: a_troll_01 (5/14/04)
|--- Enjoy!
|=============================================================================
#event Tell "#*#tells you#*#"
|=============================================================================
Sub Main
/echo Tell Alert Activated!
:MainLoop
/doevents
/delay 2s
/goto :MainLoop
/endmacro
|=============================================================================
Sub Event_Tell
:BeepLoop
/beep
/delay 1s
/goto :BeepLoop
/returnCode: Select all
Sub Event_Tell
:BeepLoop
/beep
/delay 1
/goto :BeepLoop
/return