微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在lua中保存剪贴板Windows

如何保存lua中的剪贴板(从剪贴板中获取数据)? (视窗)

(.BAT)将string添加到剪贴板

在Windows中,剪贴板实际上是什么?

怎样才能用Windows命令获取剪贴板内容

如果不重置剪贴板链,可以中止一个进程吗?

C剪贴板更新非常慢

简单! 您可以使用afxLua库保存并从剪贴板获取信息:

0 . go here - http://luaforge.net/projects/jaslatrix/ 1 . click on the "clipboard" link 2 . click on "1.0.0" 3 . select lua version accordingly. If unsure try "clipboard-1.0.0-Lua51.zip" 4 . unzip the downloaded file 5 . the documentation is inside of the clipboard.chm file. 6 . place the clipboard.dll inside of your project folder (or in the same folder as the .lua) 7 . add to the top of your code the following - require "clipboard" 8 . to get clipboard data,assign a variable to clipboard.gettext() 9 . to save data to the clipboard do this - clipboard.setdata(yourVariableOrStringHere) [Meta-numbers] 0 . Why did I make this? Because awhile ago,when I was a total newbie (lua is the first language I learned),I needed this for a project and was unable to figure out how,so the feature was never implemented despite it's importance. I was also a slightly scared of add-on libraries. 1 . I am not jaslatrix nor am I advertising his library. However,when you search "clipboard API lua" on google,it is impossible to find anything except for c library tutorials,so I figured it'd be nice to share this.

你可以使用winapi的 get_clipboard和set_clipboard函数

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐