【Photoshop JS脚本】打开URL

1.打开URL



OpenURL() 

function OpenURL() {
	try{
		var URL = new File(Folder.temp + "/baidu.html");
		URL.open("w");
		URL.writeln('<html><HEAD><meta HTTP-EQUIV="REFRESH" content="0; url=http://www.baidu.com/"></HEAD></HTML>');
		URL.close();
		URL.execute();
	}catch(e){
		alert("Error, Can Not Open.");
	};
}

2.打开URL_带跳转

openURL("https://jq.qq.com/?_wv=1027&k=58GHjlH") 

function openURL(url) {
  var fname = "shortcut.url";
  var shortcut = new File('/' + fname);
  shortcut.open('w');
  shortcut.writeln('[InternetShortcut]');
  shortcut.writeln('URL=' + url);
  shortcut.writeln();
  shortcut.close();
  shortcut.execute();
  shortcut.remove();
};

3.打开URL

system('start http://baidu.com')

4.打开URL

system ("explorer http://baidu.com")

猜你喜欢

转载自blog.csdn.net/greless/article/details/105784965