Sign in to follow this  
Followers 0
Jdurant

Question about getting a string of # to increase

8 posts in this topic

I have this code:

SetEnv,test1,%test%,

EnvAdd,test1,+1

send,%test1%

send, {enter}

Repeat, 2

SetEnv,test2,%test1%,

EnvAdd,test2,+1

send,%test2%

send, {enter}

EndRepeat

What I need is the numbers to increase by 1 each time the repeat is made, Any help or bychance a website with more examples then the homepage?

Thank you very much.

-Jd

Share this post


Link to post
Share on other sites



it still repeats itself.

is there line of code that will put a repeat of a plus 1?

Share this post


Link to post
Share on other sites

pretty much what I'm looking for is a code that will make the numbers go up in 1 (or any number really) increments

Share this post


Link to post
Share on other sites

I'm going to have aq repeat function going and what I need to have happen is the Variable needs to go up 1 each time it's used.

The problem with doing this manually is that it needs to happen about 10000 times and I don't want to program that in.

So basically it needs to have the var in the lines go up one each time it is used.

Share this post


Link to post
Share on other sites

thank you first of all for spend the time to help me here,

My question now is;

I have a range of numbers that are about 10,000 numbers.

So with those lines of code would I still have to %var9002% when I need to have the number 9002 come up? Or is there a way to make a repeat (or something else for that matter) that would have it place it in.

such as

http://www.randompage.com/randompart/%var%.html

where %var% would be a number from 1-10000 that would go up in increments as per the last number

Sorry if I seem to be repeating myself and if the code you said would work in this situation then I'll go back to trying and placing it correctly

thanks again

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

do you mean just to increment a var by 1 every cycle and that 10000 times ??

SetEnv,test,1
Repeat, 10000
send,%test%{enter}
EnvAdd,test,1
EndRepeat

EDIT:or do you mean that you want the var to increment 1 everytime you run the script ? you could do that by saving the last value in an ini file:

IniRead, test, c:\\mypath\\myfile.ini, mysection, mykey
EnvAdd,test,1
IfGreater, test, 10000, SetEnv,test,1
IniWrite, test, c:\\mypath\\myfile.ini, mysection, mykey
send,%test%{enter}
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thank you very much guys,

I think that will work and the one before will now go into my Arsenal for later use.

Thanks again guys.. This looks like it will work.

Great job with the message board

again

thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0