Community Expert
April 24, 2020
Answered
Open web-url from Script UI in default browser
- April 24, 2020
- 4 replies
- 4144 views
Hello I have created a dialog for the Photoshop script and in this dialog there is a static text that is the url of some web page. Here I have used Adobe forum url as an example. Is it possible to make it clickable and open that url in the web browser. I am aware that if this is the plugin, this is psosible. But I am using Script UI to create thsi dialog, so is it possible to make clickable link in Photoshop?
Here is the code
function showDialog() {
var obj = {};
var dlg = new Window("dialog", "Sample");
row = dlg.add('group', undefined, '');
row.add('statictext', undefined, "Path: ");
var pathInput = row.add('edittext', undefined, "");
pathInput.enabled = false;
pathInput.preferredSize = [350, 22];
//Icon button
var selectButton = row.add('button', undefined, 'Select', {
name: 'Select'
});
selectButton.onClick = function () {
var folderPath = Folder.selectDialog("Select a folder to save the files");
if (folderPath) {
pathInput.text = decodeURI(folderPath.fsName);
goButton.enabled = true;
}
};
var checkBoxGroup;
checkBoxGroup = dlg.add('group', undefined, '');
checkBoxGroup.alignment = "left";
checkBoxGroup.orientation = 'column';
checkBoxGroup.alignChildren = "left";
checkBoxGroup.margins.left = 25;
var buttonGroup = dlg.add('group', undefined, '');
buttonGroup.alignment = 'right';
var cancelButton = buttonGroup.add('button', undefined, 'Cancel', {
name: 'Cancel'
});
cancelButton.onClick = function () {
dlg.close();
};
var goButton = buttonGroup.add('button', undefined, 'Go', {
name: 'Go'
});
goButton.onClick = function () {
// Some other tasks
dlg.close();
}
if (pathInput.text == '') {
goButton.enabled = false;
}
info = dlg.add('group', undefined, '');
info.alignChildren = 'left'
var version = info.add('statictext', undefined, "Version: 1.1 ");
version.preferredSize = [350, 15];
var website = info.add('statictext', undefined, "https://community.adobe.com/");
website.preferredSize = [200, 15];
dlg.show();
}
showDialog();
Also, attached image to give clear explanantion. Please let me know whether is it possible to do using Script UI in photoshop or not? If yes, Please share any references.
Thanks in advance

