1.在Google搜索工具栏上随便添加一个按钮。
打开Google搜索工具栏的选项界面,点击“添加更多按钮”,在出现的页面上随便添加一个
按钮(比如“农历”):


2.再次打开“选项界面,切换到“自定义按钮选项卡,单击“农历后的修改,再点高级:


3.点击“高级,并用如下代码替换文本框中原有的代码:

<?xml version="1.0" encoding="utf-8"?> 
<custombuttons xmlns="http://toolbar.google.com/custombuttons/"> 
<button> 
    <search charset="gb2312">http://www.gougou.com/search?search={query}&amp;id=1</search> 
    <site>http://www.gougou.com/</site> 
    <title>狗狗</title> 
    <description>狗狗搜索</description> 
</button> 
</custombuttons>

4.单击“保存到Google工具栏...即可。


本文链接地址: 将迅雷狗狗搜索添加到Google搜索工具栏上的方法
https://blog.qingfengju.com/index.asp?id=9

分类:脚本编程 查看次数:11351 发布时间:2009/4/22 23:49:50

VBScript代码
  1. '==========================================================================   
  2. ' NAME  :   VBScript Control Photoshop 9.0 CS2   
  3. ' AUTHOR :   淡月清风 QQ:259177377 E-Mail:dgx_lsyd3@163.com   
  4. ' DATE   :   2007年4月20日23:22:43   
  5. ' COMMENT :  几个函数已经写出来,直接调用即可   
  6. ' VERSION : 1.0  
  7. '==========================================================================   
  8. Const psPixels=1   '设置Photoshop的单位是像素   
  9.   
  10. Set fso=CreateObject("Scripting.FileSystemObject")   
  11. Set PhotoshopApp=CreateObject("Photoshop.Application")   
  12. InitPhotoshop PhotoshopApp   
  13. ResizeImage PhotoshopApp,GetAppDirectory()+"现在的.jpg",1200,1600,96   
  14. ExitPhotoshop PhotoshopApp   
  15.   
  16.   
  17. '//初始化Photoshop   
  18. Sub InitPhotoshop(oPhotoshop)   
  19.  oPhotoshop.Preferences.RulerUnits=psPixels '设置默认单位为像素   
  20.  Do While oPhotoshop.Documents.Count   '关闭所有已打开的文档   
  21.   oPhotoshop.ActiveDocument.Close   
  22.  Loop  
  23. End Sub  
  24.   
  25. '//修改图片大小   
  26. Sub ResizeImage(oPhotoshop,ImageFilePath,nWidth,nHeight,nResolution)   
  27.  If fso.FileExists(ImageFilePath) Then  
  28.   oPhotoshop.Open(ImageFilePath) '打开图片   
  29.   Set oDocument=oPhotoshop.Documents.Item(1)   
  30.   oDocument.ResizeImage nWidth,nHeight,nResolution,3    
  31.   '参数依次为:宽,高,分辨率(比如96像素/英寸),采样类型   
  32.   oDocument.Save   
  33.   oDocument.Close   
  34.  End If  
  35. End Sub  
  36.   
  37. '//退出Photoshop   
  38. Sub ExitPhotoshop(oPhotoshop)   
  39.  PhotoshopApp.Quit   
  40. End Sub  
  41.   
  42. '//取得当前脚本文件所在的目录   
  43. Function GetAppDirectory()   
  44.  GetAppDirectory=Replace(WScript.ScriptFullName,WScript.ScriptName,"")   
  45. End Function  

 仅当做是抛砖引玉,呵呵
 具体可参考Photoshop 官方的参考手册:http://www.adobe.com/devnet/photoshop/scripting/

《VisualBasicReferenceGuide.pdf》   
《PhotoshopScriptingGuide.pdf》   
《JavaScriptReferenceGuide.pdf》 


本文链接地址: VBScript 编程控制 Photoshop
https://blog.qingfengju.com/index.asp?id=7

分类:脚本编程 查看次数:8921 发布时间:2009/4/20 23:28:10