Auto Click your own button.
I have created a pallette with a button that I want to click when I drop a file to a folder from bridge.
I have tried something like this but it did not work. So I am wondering if it is possible?
var mySFolder=app.document.presentationPath.slice(44,61);
var myMacHotFolder=(Folder(["/Volumes/Hotfolders/xxxxx/xxxxxx+mySFolder+".pdf"]).exists);
var myClick=iButton.addEventListener('click', function(){var myItems =app.document.thumbnail.children.length-2;myCountText.text=parseInt(myCountText.text)+myItems;});
if(myMacHotFolder==true){myClick.click();}
obviosly this is not a working chunk but all the pieces are here. I am just wondering aside from .click() what might work to enitiate the click.
