使用VB脚本将文本设置为剪贴板 [英] Set Text to Clipboard using VB Script

查看:63
本文介绍了使用VB脚本将文本设置为剪贴板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我尝试了20多个代码来设置文字到剪贴板,但是所有的东西都在VAIN !!

请帮帮我如何使用VBScript将文本设置为剪贴板。





先谢谢,

Ajay Varma

Hello,

I tried 20+ codes for setting text to clipboard, BUT ALL WENT IN VAIN!!
Please help me in how to set text to clipboard using VBScript only.


Thanks in Advance,
Ajay Varma

推荐答案

看起来你运气不好。

如果你看看MSDN: Visual Basic for Applications和VBScript之间的关键区别 [ ^ ]在系统对象下方,您会看到以下消息:



尽管Visual Basic for Applications支持Screen,Printer,App,Debug,Err和Clipboard对象,但VBScript仅支持Err对象。因此,VBScript不允许您访问这些有用的对象作为鼠标指针或剪贴板。但是,您可以使用Err对象为您的应用程序提供运行时错误处理。



您可能需要找到其他方法来实现目标。
It looks like you are out of luck.
If you look at MSDN: Key Differences Between Visual Basic for Applications and VBScript[^] at the bottom, under "System Objects" you will find this message:

"Although Visual Basic for Applications supports the Screen, Printer, App, Debug, Err, and Clipboard objects, VBScript supports only the Err object. Therefore, VBScript does not allow you to access such useful objects as the mouse pointer or the clipboard. You can, however, use the Err object to provide runtime error handling for your applications."

You will probably have to find some other way to achieve your ends.


这篇关于使用VB脚本将文本设置为剪贴板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆