Thread Tools Display Modes
09-14-22, 03:12 AM   #1
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Problem sending macro to chat box

Hello,

I used to send macros to chat box in several addons like this
Lua Code:
  1. local strTemp = "/cast Feign Death"-- for example
  2. DEFAULT_CHAT_FRAME.editBox:SetText(strTemp ) -- sent to Chat Box
  3. ChatEdit_SendText(DEFAULT_CHAT_FRAME.editBox,0)
But PTR 10 complains about a blocked command used by the addon (looks like a secure frame problem).
It still works with emote, if for example strTemp = "/sit"

Is it really a secure problem?
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
09-15-22, 03:09 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Originally Posted by Zax View Post
Hello,

I used to send macros to chat box in several addons like this
Lua Code:
  1. local strTemp = "/cast Feign Death"-- for example
  2. DEFAULT_CHAT_FRAME.editBox:SetText(strTemp ) -- sent to Chat Box
  3. ChatEdit_SendText(DEFAULT_CHAT_FRAME.editBox,0)
But PTR 10 complains about a blocked command used by the addon (looks like a secure frame problem).
It still works with emote, if for example strTemp = "/sit"

Is it really a secure problem?
I'm more surprised that this would work in any version of WoW.
Spellcasts need at the very least a hardware event (keypress or click) no addon should be able to send a command like that unattended.

Unless I'm misunderstanding what your addon is trying to do.
  Reply With Quote
09-15-22, 05:09 AM   #3
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Originally Posted by Dridzt View Post
I'm more surprised that this would work in any version of WoW.
You are right Dridzt, the given example doesn't work even on retail.
Sorry for this thread, I got confused in my tests - with all the errors generated by my addons on the PTR...
__________________
Zax - Addons List, not all maintained.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » Problem sending macro to chat box


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