Type a number starting from 0000 to 9999
Type a number starting from 0000 to 9999
So basically I'm trying to make a script that when pressing NumpadSub types in the number 0000 and presses enter and next press it will be 0001 and so on. Any idea how to do this?
Re: Type a number starting from 0000 to 9999
Code: Select all
num := 0
return
NumpadSub::
Send % Format("{:04i}", num)
num++
return
Re: Type a number starting from 0000 to 9999
Awesome! Thank you!
Re: Type a number starting from 0000 to 9999
It looks that Send % Format("{:04i}", num) won't allow a trailing{Enter} at the same line (as per my testing).
Therefore you've to add an additional Send, {Enter} to finally make it.
Last edited by BoBo on 21 Jul 2017, 11:18, edited 1 time in total.
Re: Type a number starting from 0000 to 9999
eh? did you maybe forget quotes?BoBo wrote:@ Leafdroid
It looks that Send % Format("{:04i}", num) won't allow a trailing{Enter} at the same line (as per my testing).
Therefore you've to add an additional Send, {Enter} to finally make it.
Code: Select all
num := 0
return
NumpadSub::
Send % Format("{:04i}", num) "{Enter}"
num++
return
Re: Type a number starting from 0000 to 9999
@ evilC
Cool! Haven't expected that. Thx for proving me wrong Wieder was gelernt
Cool! Haven't expected that. Thx for proving me wrong Wieder was gelernt
Who is online
Users browsing this forum: Bing [Bot], mikeyww and 139 guests