Jump to content

If within If and all the properties of IF =\


Recommended Posts

here is something i am working on:

$test1 = IniRead("C:\test\test.ini",  "test pos1", "1st", $thisisatest1)
        $test1a = StringSplit($test1, ",")
            $test2 = IniRead("C:\test\test.ini",  "test pos1", "2nd", $thisisatest2)
        $test2a = StringSplit($test2, ",")
            $test3 = IniRead("C:\test\test.ini",  "test pos1", "3rd", $thisisatest3)
        $test3a = StringSplit($test3, ",")
            $test4 = IniRead("C:\test\test.ini",  "test pos1", "4th", $thisisatest4)
        $test4a = StringSplit($test4, ",")
            $test5 = IniRead("C:\test\test.ini",  "test pos1", "5th", $thisisatest5)
        $test5a = StringSplit($test5, ",")

             if $test1a > 0 then

                 if $test2 > 0 then
                 mouseclick($test3)
                 endif

                 if $test4 > 0 then
                 mouseclick ($test5)
                 endif

                 if $test6 >0 then 
                 mouseclick ($test7)
                 endif

             endif

then it would have another set right under it. It is running $test2, but skipping $test4, and $test6 :(

ok i want it to check $test1 to see if it is more then 0. If it is more then 0 it will proceed, and check $test2.

If $test 2 is ok then i want it to check $test4. if $test4 and 6 are not ok then i want it to goto the next set.

edit: I should add that all this is wrapped inside of a function. :|

Sound confusing? try looking at it from a semi noob end =)

any ideas

Thx

Cue

edit: edited code to add some more examples.

Edited by cueclub
Link to comment
Share on other sites

This makes no sense.

MouseClick() requires two three parameters. Where are the second parameters?

Why bother with the string splits, when you never use the arrays?

Is there any point to this code at all?

:(

Edit: If the StringSplit() arrays are supposed to be the MouseClick() coordinates, then it would look like this:

mouseclick("Left", $test3a[1], $test3a[2])

Edit2: I still screwed it up, left off the button parameter.

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

it was just an example code.

something i whipped up real quick just to show on here.

I am aware mouseclick($test3a[1], $test3a[2])

lets assume they are there. It still skips $test4 and $test6 even though the ini clearly shows info there.

That is the problem im am having.

the array mix-up on the example was just that.

Link to comment
Share on other sites

gotcha will do in the future. I had found the problem.

if $test1a > 0 then

should be:

if $test1 > 0 then

it wont read the variable correctly and flags it as 0.

Thanks for the feed back.

Edited by cueclub
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...