Quantcast
Channel: Adobe Community : Unanswered Discussions - After Effects
Viewing all articles
Browse latest Browse all 30854

Why this one does not work? Simulate a mouse event

$
0
0

Hi I m trying to simulate a mouse event but is seems to not work. here is the code thata Iam using for testing

 

 

Everithing goes fine until it reraches  line number 5. in the console says dispatchEvent is  undefined

 

 

 

var win = new Window("dialog","testerWindow",[200,200,400,400]);

 

win.onClick=  function(){alert("Hello World")}

 

var event = ScriptUI.events.createEvent("MouseEvent");

 

var init = event.initMouseEvent("click",true,true,1,win,0,0,0,0,0,1);

 

win.dispatchEvent(init);

 

 

win.show()

 

it should show an alert Message as soon as the window shows up right?


Viewing all articles
Browse latest Browse all 30854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>