Jump to content

Script with part of arithmetic progression in column.


Vykintas
 Share

Recommended Posts

Hello. I need to write such script but don't know how :"> :P . The code looks similar like:

Send("{TAB}")

Send("1")

Send("{TAB}")

Send("2")

...

How to insert arithmetic algorithm like?:

do

local var, _limit, _step = tonumber(1), tonumber(9), tonumber(1)

if not (var and _limit and _step) then error() end

while (_step>0 and var<=_limit) or (_step<=0 and var>=_limit) do

block

var = var + _step

end

end

And I need to repeat (loop) it 9 times until 99, for example. Please help. Thank You in advance!

Link to comment
Share on other sites

What is the connectivity between

Send("{TAB}")
Send("1")
Send("{TAB}")
Send("2")

and the other code?

I Don't understand this sequence: _step = tonumber(1), tonumber(9), tonumber(1)

But I think, you want this:

Send("{TAB}")
Send("1"); startvalue
Send("{TAB}")
Send("2"); startvalue + $step to $limit

and this all for $n times. Its right ?

Here the code for this:

Dim $start = 1, $step = 1, $limit = 99, $n = 9
For $i = 1 To $n
    For $k = $start To $limit Step $step
        Send("{TAB}")
        Send($k)
    Next
Next
Exit

Best Regards BugFix  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...