WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR General Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=172)
-   -   Problem sending macro to chat box (https://www.wowinterface.com/forums/showthread.php?t=59219)

Zax 09-14-22 03:12 AM

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?

Dridzt 09-15-22 03:09 AM

Quote:

Originally Posted by Zax (Post 341002)
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.

Zax 09-15-22 05:09 AM

Quote:

Originally Posted by Dridzt (Post 341008)
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... :confused:


All times are GMT -6. The time now is 05:47 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI