Thread Tools Display Modes
11-23-16, 10:37 AM   #1
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Click from secure env

Basically trying to figure out if calling a click directly from secure code is possible or not, this is not my area of expertise.

Example:
Lua Code:
  1. local Frame = CreateFrame('Frame', 'FrameName', UIParent, 'SecureHandlerStateTemplate')
  2. Frame:SetAttribute('_onstate-visible', [[
  3.     self:Click() -- fail
  4. ]])
  5. RegisterStateDriver(Frame, 'visible', '[mod:alt] show; hide')
  Reply With Quote
11-23-16, 03:31 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
There isn't a click method or any equivalent for frame handlers inside the restricted environment. I'm not very experienced in the environment either, but I did do a dump of the metatable when I tried to do this myself. Now that I think about it, it would be possible to automate stuff through the secure templates if it were allowed.

For example, you have a SecureActionButtonTemplate mixed with SecureHandlerAttributeTemplate registered with the UnitWatchDriver to run its own :Click() function when you target or even mouseover an enemy. It would be further possible to set the attributes from within the restricted environment to select which ability to use or even run macro text.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 11-23-16 at 04:16 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Click from secure env

Thread Tools
Display Modes

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