Thread Tools Display Modes
02-17-13, 02:19 PM   #1
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
Quick question about actionbar API

Hey what is the API function to move a spell or macro to a slot on the action bar? I know there are various SetBinding() calls in the WOW API to bind specific things to keybinds but I'm wondering how to move specific macros or spells to an actual button on an action bar. I've looked but I must be a nob because I can't seem to identify the proper entry.

for example to move Focus Fire from the #5 button on Action Bar 1 to button #4 equivalent to pressing shift button to move it manually

thanks in advance to anyone who can forward me that info
  Reply With Quote
02-17-13, 02:43 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Lua Code:
  1. PickupAction(5)
  2. PlaceAction(4)
  3. ClearCursor()
  Reply With Quote
02-17-13, 08:39 PM   #3
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
thanks dude

I was on the API list searching up and down for "button" "bar" and "action" for half an hour with no success and of course after you point out the function, I read its description and "action" and "bar" jump right out at me lol

looks like it's a protected function, so I'll have to do some more thinking about how I want to implement my code but appreciate the pointer
  Reply With Quote
02-19-13, 01:38 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
They're only protected while in combat lockdown. Outside of combat lockdown you can pickup and place actions as much as you like from insecure code.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-19-13, 03:24 AM   #5
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Does LibActionButton-1.0 help you? Or its API?

Last edited by myrroddin : 02-19-13 at 03:25 AM. Reason: Get correct link for API pages
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Quick question about actionbar API


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off