This addon adds the /select macro command you can use instead of /use or /cast to use an item or spell among a list. Right-clicking your macro from the bars will pop out a menu where you can change the item or spell to use.

__ New in 2.1.4 __

- Fix for hyphenated items (such as item:Battle-Stone)

__ How to use __

- Create a macro with this line:

/select item or spell, item or spell, item or spell, etc

- Choose the red question mark icon if you want the icon to reflect what's selected.
- Drag the macro to your bars.
- The first item or spell will be the default action when you hit the macro.
- Right-click the macro on your bars to change it to a different item or spell.

For instance, warriors may find this useful:

/select Battle Shout, Commanding Shout

When you create that macro it will cast Battle Shout every time it's hit.  If you join a group with a death knight and want to use Commanding Shout instead, right-click the macro on your bars and choose Commanding Shout.  Now the macro will display and cast Commanding Shout.

You can also embed a /select within a larger macro.  For mages:

/focus [@focus,noexists][@focus,dead][mod:alt]
/select [@focus,exists][] Polymorph, Polymorph(Turtle), Polymorph(Rabbit), Polymorph(Black Cat)

This is a standard focus-sheep macro.  When you want to change what polymorph spell to use, right-click the macro on your bars and pick another.  It will use that new polymorph until you decide to change it again.

__ Search:Keywords __

To help add items and spells to your /select menus (especially since there's a 26 character tax to macro space, discussed later), several search:keywords are added.  Note that all of the search keywords are Case Sensitive.

item:id or partial name
Add an item by its item:id or all items in your bags and person that contain the partial name.
item:1234
item:Bandage
item:Ore

spell:id or partial name
Add a spell by its spell:id or all spells in your spellbook that contain the partial name.
spell:1234
spell:Teleport
spell:Polymorph

mount:flying, land, any or partial name
Add all flying mounts, land mounts, any mount, or all mounts that contain the partial name.
mount:flying
mount:Mechanostrider
mount:Drake

type:"GetItemInfo" type
Add all items that contain the search words in one of its type fields.  See http://www.wowpedia.org/ItemType for a full list.
type:Quest
type:Herb
type:Food & Drink

profession:primary, secondary, any or partial name
Add primary, secondary or any profession.  Supporting skills such as Survey for Archaeology will also be added.
profession:primary
profession:any
profession:Archaeology

You can use filters alongside item or spell names too. For instance:

/select Mythical Healing Potion, item:Bandage, Healthstone, type:Food & Drink

Also, to save space you can use i: s: m: and t: as shortcuts for item: spell: mount: and type:

__ Using stuff in the popout menu __

The standard behavior of clicking an item or spell in the popout menu is to swap your /select macro to use that new item or spell the next time it's hit.

If you want to use it immediately, hold <Alt> as you select it.

If you want this behavior to happen all the time without holding <Alt>, there's an option to change it in the default interface options:

Use Item or Spell When Selecting: When this is checked, selecting an item or spell will also use it, acting more like the default's flyout menus.

There is another option that works whether the above is used or not:

Use But Don't Select with <Alt>: With this checked, holding <Alt> as you click an item or spell in the popout menu will use it, but it will not select it.  This is useful for infrequently-used things like vendor mounts and soulwells.

__ New [condition] support in 2.1 __

Version 2.1 introduces [condition] support for /select macros just like you use in secure slash commands like /cast.  Every [condition] supported by the macro system is supported here.  Some examples:

/select [flyable] Name of flying mount, Another flying mount; Name of land mount
/select [@focus,exists][] spell:Polymorph
/select [combat] Master Healing Potion, Healthstone; [nocombat] item:Food & Drink
/select [spec:1] Conjured Mana Cake, Cobo Cola; Conjured Mana Cake, Frybread
/select [nopet] spell:Summon Demon; Grimoire of Sacrifice

If you also use Select Favorite Mounts, you can also use the favoriteflying (or fflying) and favoriteland (or fland) mount filters:

/select [swimming] Riding Turtle; [flyable] mount:favoriteflying; mount:favoriteland

__ Reduced macro length "tax" in 2.1 __

To do its magic, Select needs to add a line like this to your macros that contain a /select command:

/click [btn:2]S01:M;S01:A

It will do this on its own and it will recreate this line if it's accidentally deleted or altered.  You don't need to worry about it except to remember that when writing your /select macros your macro needs at least 26 characters free for it to add this line (if it's not already there).

__ Limitations __

- When you create or edit a macro in combat (you should be fighting!) it will wait until you leave combat to turn the macro on or make changes from your edit.
- If you gain an item or spell that wasn't available as you entered combat, that item or spell won't be available until you leave combat.
- If you change the 'Use Item or Spell When Selecting' option in combat, the change won't happen until you leave combat.

__ Future plans __

- pet:<name> or <species> search to add companion pets
- slot:<number> search to implement swapping gear to a specific slot
- /select command option to exclude items from the list (ie /select item:Ink -Virtuoso Inking Set)

__ Frequently Asked Questions __

Q: What action bar addons does this support?
A: All of them!  Default too, of course.  If you can drop a Blizzard macro onto the button then it should work on that button.  However, if the macros are outside of the game's 36 general/18 character-specific macro slots, Select won't be aware of them.

Q: Can I add companion pets to a /select?
A: Not yet, sorry. Working on it!

Q: Can I change the order that items or spells list in the menu?
A: If you want certain items to list before others, add them manually. ie: "/select x-51 nether-rocket x-treme, mount:flying" will list the x-51 rocket first.

Q: Tyrael's Charger is missing from my land mounts!
A: Tyrael's Charger can fly so it's grouped with the flying mounts. But if you want to add it to your land mounts you can add it manually: /select tyrael's charger, mount:land

Q: Can I use this to swap trinkets to equip and use?
A: You can! Try "/select type:INVTYPE_TRINKET". At present it will only equip the top trinket slot. A future update will have a slot:<number> filter to support swapping all slots.

Q: Can you make the popout menu align to the action/macro button?
A: No. The secure methods to get the menu working in combat prohibits anchoring willy nilly.

__ Changelog __
2.1.4, 2/20/13, fix for hyphenated item:searches
2.1.3, 1/14/13, fix for mounts not completely loading on login
2.1.2, 12/26/13, frames join UISpecialFrames only when they're shown (out of combat)
2.1.1, 9/11/13, toc update for 5.4
2.1.0, 6/22/13, semi-rewrite: state driver added, flyouts indexed by their list instead of their macro, DontSelectWithAlt option, item cache added, 
2.0.13, 5/19/13, toc update, summonpet works in combat, menus at top of screen grow downward
2.0.12, 5/5/13, added mount:favorites filter if Select Favorite Mounts loaded
2.0.11, 4/18/13, BAG_UPDATE unregistered if all menus populated, added Select_PerCharacter_Settings to restore initial actions to last attributes, removed profiling tools
2.0.10, 4/06/13, removed G_PetRoster, added profiling tools
2.0.9, 3/28/13, removed internal pet system, added G_PetRoster
2.0.8, 2/18/13, added macrotext support, centralized timer system, internal pet system
2.0.7, 1/26/13, added tooltips to /select macros
2.0.6, 9/23/12, added nil,1 to GetItemCount in parent:OnShow, added throttled UpdateMacroIcons on BAG_UPDATE, PLAYER_EQUIPMENT_CHANGED
2.0.5, 9/21/12, rewrite release
1.0.0, 11/08/08, initial release
