发送whatsapp到号码+修剪的脚本

问题描述 投票:0回答:1

我创建了一个使用whatsapp api 的脚本,它采用所选/剪贴板编号并从那里构建 URL。我设法做到了这一点(我是 AH 的新手),但我无法修剪空格(我认为这应该很容易)。这是我到目前为止的脚本

{
  Send, ^c
  Sleep 50
  wspNumber := Trim(clipboard)
  Run, https://api.whatsapp.com/send?phone=%wspNumber%
}

如果数字是这样的 11111111 工作完美,但当我有类似 111 111 111 的数字时它不会修剪。

autohotkey
1个回答
0
投票
  Send, ^c
  Sleep 50
  wspNumber := RegExReplace(clipboard, "\D")
  Run, https://api.whatsapp.com/send?phone=%wspNumber%
© www.soinside.com 2019 - 2024. All rights reserved.