Sign in to follow this  
Followers 0
jackyyll

Need some more help.. With INI's

10 posts in this topic

#1 ·  Posted (edited)

Alright since nobody is helping my with my other INI question i decided to skip to another part of my bot.... the script enginge/parser. Alright i know how to parse it the only problem i have is telling it to read StepCount=* THEN use the use the value as $stepcount then read Step*=DO STUFF TO Step[$stepcount]=DO STUFF. For Example say

StepCount=2

Step1=DO STUFF

Step2=DO STUFF

THEN DO NOTHING ELSE so it doesnt loop around and do step1 again..

I've been using

For $sn = 0 To $sc
DO STUFF
Next

But that just creats a loop and doesnt end after $sc is reached (I refered to $sc as $stepcount above)

Edited by jackyyll

Share this post


Link to post
Share on other sites



just a quick guess here

try

for $i = 0 to number($sc)
;DOOOOOO SHTUFFFFFFFFf
next

:o


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

You can always use Exitloop to get out of a loop.

Share this post


Link to post
Share on other sites

do you mean like

If $sn = $sc
ExitLoop
EndIf

?

Share this post


Link to post
Share on other sites

Well yes, that's how the Exitloop would work, but I don't get why it would loop around more than once in a single for loop, or why it wouldn't stop when $sc is reached. Do you have more code than just what is posted?

Share this post


Link to post
Share on other sites

Not sure if this is the issue, but having a for loop starting at 0 and going to 1 will run twice. For 1 to 1 runs once.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I changed it to 1 and it still repeated :o

Also theres another problem, when i have the script so it looks like this:

[Main]
TransactionCount=1

[Transaction1]
CheckCount=1
Check1=Level, 800, skip
StepCount=2
Step1=Move, 15, 20
Step2=Move, 79, 72

It skips right to Step2=Move, 79, 72 instead of doing Step1=Move, 15, 20 first =x

Edited by jackyyll

Share this post


Link to post
Share on other sites

Anyone else have any ideas? Pleaseee i need to get this working lol. If StepCount=2 It goes to Step2=STUFF instead of first reading step1=STUFF. Then it repeats the step over and over not sure how many times tho

Share this post


Link to post
Share on other sites

If i understand your problem....

you migh ttry scratching the for loop and just doing-

while 1
   if $somthing=$somthingelse then exitloop
   whatever
   morestuff
   things
wend

Im not sure though if this is what you mean....

Share this post


Link to post
Share on other sites

Well i cant really do that i dont think because the For statements judge what step im on.. since they count off To the $var. Once it hits that var its suposed to do nothing but i guess it's not working..

Share this post


Link to post
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
Sign in to follow this  
Followers 0