Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

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

  • Recently Browsing   0 members

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