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?