<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.easyuo.com/index.php?action=history&amp;feed=atom&amp;title=OnHotKey</id>
		<title>OnHotKey - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.easyuo.com/index.php?action=history&amp;feed=atom&amp;title=OnHotKey"/>
		<link rel="alternate" type="text/html" href="http://wiki.easyuo.com/index.php?title=OnHotKey&amp;action=history"/>
		<updated>2026-04-30T04:05:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>http://wiki.easyuo.com/index.php?title=OnHotKey&amp;diff=5438&amp;oldid=prev</id>
		<title>Seg at 20:16, 1 November 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.easyuo.com/index.php?title=OnHotKey&amp;diff=5438&amp;oldid=prev"/>
				<updated>2007-11-01T20:16:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{command header|client}}&lt;br /&gt;
{{body|onHotKey &amp;lt;nowiki&amp;gt;{key-specifier} {[alt] | [ctrl] | [shift]}&amp;lt;/nowiki&amp;gt;|The onHotKey command performs the following line of code (brackets do NOT work) when a certain key is pressed.&lt;br /&gt;
The key-specifier can either be A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP, END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note|The code is only executed when the parser passes it, if you want a key-press to perform a certain action you have to make a loop. See the example.}}&lt;br /&gt;
&lt;br /&gt;
{{note|This function is '''NOT''' client or focus specific. Be careful what you type when running a script with onhotkey, chatting on one client, or in a different application may cause your character to do things in game you do not intend.}}&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set #lpc 1000&lt;br /&gt;
repeat&lt;br /&gt;
  onhotkey a&lt;br /&gt;
    gosub hotkey a&lt;br /&gt;
  onhotkey b&lt;br /&gt;
    gosub hotkey b&lt;br /&gt;
  onhotkey c&lt;br /&gt;
    gosub hotkey c&lt;br /&gt;
  onhotkey d&lt;br /&gt;
    gosub hotkey d&lt;br /&gt;
  onhotkey e&lt;br /&gt;
    gosub hotkey e&lt;br /&gt;
  sleep 1&lt;br /&gt;
until #false&lt;br /&gt;
&lt;br /&gt;
sub hotkey&lt;br /&gt;
{&lt;br /&gt;
  event sysmessage %1&lt;br /&gt;
  Loop:&lt;br /&gt;
  sleep 1&lt;br /&gt;
  onhotkey %1&lt;br /&gt;
    goto Loop&lt;br /&gt;
  return&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set #lpc 1000&lt;br /&gt;
desactive:&lt;br /&gt;
  onhotkey t alt&lt;br /&gt;
    goto active&lt;br /&gt;
  onhotkey y alt&lt;br /&gt;
    halt&lt;br /&gt;
goto desactive&lt;br /&gt;
&lt;br /&gt;
active:&lt;br /&gt;
    onhotkey r alt&lt;br /&gt;
      goto desactive&lt;br /&gt;
    goto active&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
{{Client}}&lt;/div&gt;</summary>
		<author><name>Seg</name></author>	</entry>

	</feed>