关于VB剪贴板操作的问题
我想做一个复制一段代码,判断他是hash值的时候在前面加上磁力链接的标志代码,就是那个magnet什么什么的。再放到剪贴板里供直接黏贴用。但是做完之后那串代码重复了三遍在...
我想做一个复制一段代码,判断他是hash值的时候在前面加上磁力链接的标志代码,就是那个magnet什么什么的。再放到剪贴板里供直接黏贴用。但是做完之后那串代码重复了三遍在加上hash值,具体代码贴下面。求大神指点。
Dim url As String, key As String = "s/", pan As String = "pan.baidu.com/", pan1 As String = "pan.baidu.com/s/", magnet As String = "magnet:?xt=urn:btih:"
Dim k As String
url = Clipboard.GetText
If url.Contains(key) = True Then
Clipboard.Clear()
k = pan & url
Clipboard.SetText(k)
ElseIf url.Length <= 8 Then
Clipboard.Clear()
k = pan1 & url
Clipboard.SetText(k)
Else
Clipboard.Clear()
k = magnet & url
Clipboard.SetText(k)
endif
具体黏贴出来的效果是这样的:magnet:?xt=urn:btih:magnet:?xt=urn:btih:magnet:?xt=urn:btih:C11100CD19E57376A5BF90D7D1EAEBA3118D75B1STARLESS 展开
Dim url As String, key As String = "s/", pan As String = "pan.baidu.com/", pan1 As String = "pan.baidu.com/s/", magnet As String = "magnet:?xt=urn:btih:"
Dim k As String
url = Clipboard.GetText
If url.Contains(key) = True Then
Clipboard.Clear()
k = pan & url
Clipboard.SetText(k)
ElseIf url.Length <= 8 Then
Clipboard.Clear()
k = pan1 & url
Clipboard.SetText(k)
Else
Clipboard.Clear()
k = magnet & url
Clipboard.SetText(k)
endif
具体黏贴出来的效果是这样的:magnet:?xt=urn:btih:magnet:?xt=urn:btih:magnet:?xt=urn:btih:C11100CD19E57376A5BF90D7D1EAEBA3118D75B1STARLESS 展开
1个回答
展开全部
Dim url As String, key As String = "s/", pan As String = "pan.baidu.com/", pan1 As String = "pan.baidu.com/s/", magnet As String = "magnet:?xt=urn:btih:"
Dim k As String
url = Clipboard.GetText
If url.Contains(key) = True Then
Clipboard.Clear()
k = pan & url
Clipboard.SetText(k)
ElseIf url.Length <= 8 Then
Clipboard.Clear()
k = pan1 & url
Clipboard.SetText(k)
Else
Clipboard.Clear()
k =magnet & magnet & magnet & url
Clipboard.SetText(k)
endif
东莞大凡
2024-08-07 广告
2024-08-07 广告
在东莞市大凡光学科技有限公司,我们利用Halcon软件处理机器视觉项目时,会用到自定义标定板以满足特定需求。Halcon支持用户根据实际应用场景自定义标定板形状与标记点。这不仅可以灵活应对不同工作环境,还能提高标定精度。通过调整圆点数量、间...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询