Autohotkey: Difference between revisions

From FreeAllegiance Wiki
Jump to navigationJump to search
(Wikified)
m (trimming the help category)
 
(9 intermediate revisions by 3 users not shown)
Line 3: Line 3:
Several members of the community have made scripts that give functionality to the mousewheel and additional mousebuttons, these scripts are run with AutoHotKey - a freeware program available [http://www.autohotkey.com/ here]. When you use the mousewheel or additional mouse buttons, the script converts these actions into standard key presses on the keyboard (or a series of key presses for more complicated functions) causing allegiance to respond as desired.
Several members of the community have made scripts that give functionality to the mousewheel and additional mousebuttons, these scripts are run with AutoHotKey - a freeware program available [http://www.autohotkey.com/ here]. When you use the mousewheel or additional mouse buttons, the script converts these actions into standard key presses on the keyboard (or a series of key presses for more complicated functions) causing allegiance to respond as desired.


Some of these scripts are:
Some of these scripts are listed below.


===Denga and Flower's FlowerZoom===
:'''Note:''' You will need to download and install [http://www.autohotkey.com/ autohotkey] to use these scripts.
 
==[http://www.freeallegiance.org/forums/index.php?s=&showtopic=24194&view=findpost&p=25360 Denga and Flower's FlowerZoom]==


This script allows you to:
This script allows you to:


:* Zoom with mouse wheel
* Zoom with mouse wheel
:* Toggle between flight and turret modes with scroll lock button
* Toggle between flight and turret modes with scroll lock button
 
==[http://www.freeallegiance.org/forums/index.php?automodule=blog&blogid=13&showentry=107 Madpeople's Hotkey mod]==
 
An evolution of FlowerZoom, this script allows you to:
 
* Use the mousewheel to adjust zoom level and with modifier keys: throttle settings, scroll chat and change the zoom sensitivity level
* Use mouse button 3 to mute speakers while it is pressed to remove background noise when speaking on [[TeamSpeak|TeamSpeak (TS)]] - this assumes you also use mouse button 3 for push to talk in TS
* Use mouse button 4 in conjunction with other keys to, change between flight and turret modes, paste clipboard contents into allegiance chat, say custom "quick chats".
* Kill allegiance with ctrl+shift+escape - makes getting back to windows easier if allegiance crashes
* Optionally login to [[TS]], start TSO and launch allegiance from a single shortcut
* Optionally exit TS and TSO when [[ASGS]] closes
 
==[http://www.freeallegiance.org/forums/index.php?automodule=blog&blogid=13&showentry=211 Madpeople's mpAL]==
"mpAL" is essentially the Hotkeys mod with more features and a much simplified install procedure.
 
Feature List:
* Zoom on mouse wheel
* Chat scrolling on mouse wheel
* Pasting text into allegiance chat
* Use custom quick chats - enter long lines of text into the chat with a key combination
* Change text colour in allegiance with a key combination
* Mute speakers when you press Mouse 3 (designed for people who use Mouse 3 as Teamspeak's push to talk button) - remove background noise
* Automatically start [[TS]] and TSO when you login to allegiance
* Automatically login [[ASGS]] when ASGS starts
* Kill allegiance.exe by pressing ctrl+shift+esc
* Media player control
* If the script is set to start TSO, it checks first to see if fraps is running and closes it if necessary (to prevent them conflicting), when ASGS closes the script re-starts fraps if it closed it
* Disable the Windows key
 
 
==Simple scripts==
# Download and install Autohotkey, available free of charge at [http://www.autohotkey.com/ autohotkey.com].
# Create a new file called Alleg.AHK
#* Optional: Save this file in <tt>C:\Documents and Settings\Administrator\Start Menu\Programs\Startup</tt> so it always load when you start Windows.
# Copy the following two lines of code into the file, before copying anyone else's script. These two lines will ensure that the scripts only run when Allegiance is, so they won't interfere with the rest of your programs.
SetTitleMatchMode, 3
#IfWinActive Allegiance
 
===NumLock and NumEnter===
'''Function:''' Allows you to rebind those keys to something useful. In the example below they are bound to ripcord and cloak.
 
NumLock::
Send r
return
NumpadEnter::
Send k
return
 
===Need repairs===
'''Function:''' Sends "Need repairs" to the current sector at the press of a single button, {{k|FOO}} (you choose what FOO is).
 
{{k|FOO}}::
SendInput {enter}All{tab}{tab}{tab}{`}nx{enter}{tab}{enter}
return


[http://www.freeallegiance.org/forums/index.php?s=&showtopic=24194&view=findpost&p=25360 Download]
===Attack my target===
'''Function:''' As above, but for Attack my Target
{{k|FOO}}::
SendInput {enter}All{tab}{tab}{tab}{`}5{enter}{tab}{enter}
return


===madpeople's Hotkey mod===
===Chat to Wing===
An evolution of FloweZoom, this script allows you to:
'''Function:''' Opens a chatbox to your Wing channel by hitting Right {{k|Ctrl}}. Upon finishing the message (by hitting {{k|Esc}}, {{k|Enter}} or Right {{k|Ctrl}}) it will return you to Team channel.


:* Use the mousewheel to adjust zoom level and with modifier keys: throttle settings, scroll chat and change the zoom sensitivity level
switcher = 0
:* Use mouse button 3 to mute speakers while it is pressed to remove background noise when speaking on [[TeamSpeak|TeamSpeak (TS)]] - this assumes you also use mouse button 3 for push to talk in TS
:* Use mouse button 4 in conjunction with other keys to, change between flight and turret modes, paste clipboard contents into allegiance chat, say custom "quick chats".
rctrl::
:* Kill allegiance with ctrl+shift+escape - makes getting back to windows easier if allegiance crashes
    IfEqual, Switcher, 1
:* Optionally login to TS, start TSO and launch allegiance from a single shortcut
    {SendInput {Enter}{Enter}All{Tab}{Tab}{Tab}{Tab}{Enter}
:* Optionally exit TS and TSO when ASGS closes
    Switcher = 0
        }
    Else
        {SendInput {Enter}All{Tab}{Tab}
        switcher = 1
        }
return
Enter::
    IfEqual, Switcher, 1
    {SendInput {Enter}{Enter}All{Tab}{Tab}{Tab}{Tab}{Enter}
    Switcher = 0
    }
    Else
        {SendInput {Enter}
    }
return
Esc::
    IfEqual, Switcher, 1
    {SendInput {Esc}{Enter}All{Tab}{Tab}{Tab}{Tab}{Enter}
    Switcher = 0
    }
    Else
    {SendInput {Esc}
    }
return


[http://www.freeallegiance.org/forums/index.php?automodule=blog&blogid=13&showentry=107 Download]


[[Category:Help - Tools]]
[[Category:Utilities]]

Latest revision as of 02:46, 23 April 2009

Autohotkey is a program that allows you to map just about any key on your keyboard or mouse to another. AHK offers a great measure of control, due to its use of scripts.

Several members of the community have made scripts that give functionality to the mousewheel and additional mousebuttons, these scripts are run with AutoHotKey - a freeware program available here. When you use the mousewheel or additional mouse buttons, the script converts these actions into standard key presses on the keyboard (or a series of key presses for more complicated functions) causing allegiance to respond as desired.

Some of these scripts are listed below.

Note: You will need to download and install autohotkey to use these scripts.

Denga and Flower's FlowerZoom

This script allows you to:

  • Zoom with mouse wheel
  • Toggle between flight and turret modes with scroll lock button

Madpeople's Hotkey mod

An evolution of FlowerZoom, this script allows you to:

  • Use the mousewheel to adjust zoom level and with modifier keys: throttle settings, scroll chat and change the zoom sensitivity level
  • Use mouse button 3 to mute speakers while it is pressed to remove background noise when speaking on TeamSpeak (TS) - this assumes you also use mouse button 3 for push to talk in TS
  • Use mouse button 4 in conjunction with other keys to, change between flight and turret modes, paste clipboard contents into allegiance chat, say custom "quick chats".
  • Kill allegiance with ctrl+shift+escape - makes getting back to windows easier if allegiance crashes
  • Optionally login to TS, start TSO and launch allegiance from a single shortcut
  • Optionally exit TS and TSO when ASGS closes

Madpeople's mpAL

"mpAL" is essentially the Hotkeys mod with more features and a much simplified install procedure.

Feature List:

  • Zoom on mouse wheel
  • Chat scrolling on mouse wheel
  • Pasting text into allegiance chat
  • Use custom quick chats - enter long lines of text into the chat with a key combination
  • Change text colour in allegiance with a key combination
  • Mute speakers when you press Mouse 3 (designed for people who use Mouse 3 as Teamspeak's push to talk button) - remove background noise
  • Automatically start TS and TSO when you login to allegiance
  • Automatically login ASGS when ASGS starts
  • Kill allegiance.exe by pressing ctrl+shift+esc
  • Media player control
  • If the script is set to start TSO, it checks first to see if fraps is running and closes it if necessary (to prevent them conflicting), when ASGS closes the script re-starts fraps if it closed it
  • Disable the Windows key


Simple scripts

  1. Download and install Autohotkey, available free of charge at autohotkey.com.
  2. Create a new file called Alleg.AHK
    • Optional: Save this file in C:\Documents and Settings\Administrator\Start Menu\Programs\Startup so it always load when you start Windows.
  3. Copy the following two lines of code into the file, before copying anyone else's script. These two lines will ensure that the scripts only run when Allegiance is, so they won't interfere with the rest of your programs.
SetTitleMatchMode, 3
#IfWinActive Allegiance

NumLock and NumEnter

Function: Allows you to rebind those keys to something useful. In the example below they are bound to ripcord and cloak.

NumLock::
Send r
return

NumpadEnter::
Send k
return

Need repairs

Function: Sends "Need repairs" to the current sector at the press of a single button, FOO (you choose what FOO is).

FOO::
SendInput {enter}All{tab}{tab}{tab}{`}nx{enter}{tab}{enter}
return

Attack my target

Function: As above, but for Attack my Target

FOO::
SendInput {enter}All{tab}{tab}{tab}{`}5{enter}{tab}{enter}
return

Chat to Wing

Function: Opens a chatbox to your Wing channel by hitting Right Ctrl. Upon finishing the message (by hitting Esc, Enter or Right Ctrl) it will return you to Team channel.

switcher = 0

rctrl::
   IfEqual, Switcher, 1
   	{SendInput {Enter}{Enter}All{Tab}{Tab}{Tab}{Tab}{Enter}
    	 Switcher = 0
       }
   Else
       {SendInput {Enter}All{Tab}{Tab}
        switcher = 1
       }
return

Enter::
   IfEqual, Switcher, 1
   	{SendInput {Enter}{Enter}All{Tab}{Tab}{Tab}{Tab}{Enter}
    	 Switcher = 0
   	}
   Else
       {SendInput {Enter}
   	}
return

Esc::
   IfEqual, Switcher, 1
   	{SendInput {Esc}{Enter}All{Tab}{Tab}{Tab}{Tab}{Enter}
    	 Switcher = 0
   	}
   Else
   {SendInput {Esc}
   }
return