how to copy a number on mouse click

时间:2016-10-07 23:18:28

标签: batch-file

I am trying to make a simple .bat program which copies a number on my clipboard when i execute this bat file. so that I can paste it anywhere. it should work like a tally counter and should increment the number every time I click on it.

here is what I have tried so far, but it copies "1000++1" to my clipboard

echo|set /p=1000++1|clip

1 个答案:

答案 0 :(得分:0)

喜欢@Squashman说:

@echo off
if not exist count.txt echo 0 > count.txt
set /p $count=< count.txt
set /a $Count+=1
echo %$count% | clip
echo %$count% > count.txt