Copy link to clipboard
Copied
Hi All,
below doscript code not working with onClick event. But when i try this without onClick event its working fine. What's wrong with it?
dialog.IconButton.onClick = function()
{
var openurl = "tell application \"Safari\"\ractivate\rdo JavaScript \"window.open('http://www.yahoo.com')\" in document 1\rend tell"
app.doScript(openurl, ScriptLanguage.applescriptLanguage)
}
Any other suggestion for goto URL on click on image button in Javascript or with Applescript.
Thanks,
Shonky
var linkJumper = File(Folder.temp.fullName+"/In-Tools.html");
linkJumper.open("w");
var linkBody = '<html><head><META HTTP-EQUIV=Refresh CONTENT="0; URL=http://in-tools.com"></head><body> <p></body></html>'
linkJumper.write(linkBody);
linkJumper.close();
linkJumper.execute();
Harbs
Copy link to clipboard
Copied
I HATE JIVE!
I responded to this many hours ago, but the email disappeared into Jiveland...
I just happened to browse the web view, and noticed that my reponse never made it...
Here was my response:
Is it a dialog or a palette?
app.doScript() does not work when a modal dialog is open. If you want to use app.doScript(), you'd need to either use a palette/window instead of a dialog, or close the dialog before the doScript().
The other option is writing a html launcher file and executing that...
Harbs
Copy link to clipboard
Copied
Hi Harbs,
Thank you very much for replying.
I am using doScript with dialog.
Can you please show a sample of html launcher file because i have not any idea regarding this.
Thanks,
Shonky
Copy link to clipboard
Copied
var linkJumper = File(Folder.temp.fullName+"/In-Tools.html");
linkJumper.open("w");
var linkBody = '<html><head><META HTTP-EQUIV=Refresh CONTENT="0; URL=http://in-tools.com"></head><body> <p></body></html>'
linkJumper.write(linkBody);
linkJumper.close();
linkJumper.execute();
Harbs
Copy link to clipboard
Copied
Thanks again,
Shonky
Find more inspiration, events, and resources on the new Adobe Community
Explore Now