Question
Possible to send files to 3rd party program?
I'm trying to add a "Send to Flickr Uploadr" context menu to bridge, but I've hit a snag in getting the files to the Flickr Uploader program. <br /><br />I've tried using openWith(), but i don't think that it does what I want it to do. But the documentation on openWith() is a bit sparse. If openWith() is indeed the wrong method to use, what is correct way, or is this even possible? <br /><br />Thanks.<br /><br />here's what i've got so far...<br /><br />// path to flickr uploader<br />flickrPath = "/C/Program Files/Flickr Uploadr/Flickr Uploadr.exe";<br /><br />// only have 1 instance of each<br />function checkEl(w){<br />> var menuEl = MenuElement.find(w);<br />> if (menuEl != null){<br />> MenuElement.remove(w);<br />> }<br />}<br /><br />// send selected files to flickr uploader<br />function send2Flickr(f){<br />> fName = app.document;<br />> for (i=0; i<fName.selections.length; i++){<br />> files = new Thumbnail(File(fName.selections.path));<br />> files.openWith(flickrPath);<br />> }<br />}<br /><br />// check to see if the menu items exist, and remove and recreate if they do<br />checkEl('send2Flickr');<br /><br />// right click context menu<br />var cntCommand = new MenuElement("command", "Send to Flickr Uploadr", "at the end of Thumbnail", "send2Flickr");<br />cntCommand.onSelect = function (f){<br />> send2Flickr();<br />}
