Hey Guys,
Basically, I have a macro that hasa variable, lets say 100. It adds +1, uses the variable and does this 50 times. On the 50th time it stops, so it is now at 150. The next time I load the macro, I want it to start on what it left off at, so in this case, 150.
How can I do this? Is there some sort of "write" feature in a macro? I also thought of opening a notepad file and copying and pasting it and then saving the variable, but i cant think of a way to take whats being copied and "+1" it without it being a variable..
Any help would be greatly appreciated =)
Thanks
Using a gradually increasing variable that gets saved on...
Moderators: JRL, Dorian (MJT support)
Why not use a specialized text file called ini-file


UntestedLet>k=0
Let>maxk=50
Let>inifile=C:\MyKLoops.ini
ReadIniFile>%inifile%,Ks,Loops,k
Add>maxk,%k%
If>k=0, Loop
Message># of previous loops taken from the INI = %k%
Label>Loop
Add>k,1
If>k=%maxk%, KeepIt, Loop
Label>KeepIt
EditINIFile>EditIniFile>%inifile%,Ks,Loops,%k%
Message>Done. Finished with %k% loops today.%CRLF%Bye !
-----
Filename: MyKLoops.ini
Filecontent:
[Ks]
Loops=0

- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
And now there's one for you too!
Tuff being so good, makes for an easy target!
May I suggest that you also edit the original so that it can be cut/pasted or used in future by anyone who may not catch the following correction? Might see it in a search, and not read the entire thread.


Tuff being so good, makes for an easy target!
May I suggest that you also edit the original so that it can be cut/pasted or used in future by anyone who may not catch the following correction? Might see it in a search, and not read the entire thread.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: