Sign in to follow this  
Followers 0
inertial

Escaping newlines to allow one statement to span multiple lines

3 posts in this topic

Seeing as AutoIt3 takes a newline to be the end of a statement, is there any way to escape a newline character so that you can have a statement that spans multiple lines?

Ah the dubious joys of significant whitspace....

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Use a underscore at the end of the line, like this:

For $i = 1 to $glob_Marketplace_Queue[$city][0][0]
        if $glob_Marketplace_Queue[$city][$i][4] = _DateAdd('DD', $days, _NowCalcDate()) _
            and $glob_Marketplace_Queue[$city][$i][7] = Number($Materials_array[3]) _
            and $glob_Marketplace_Queue[$city][$i][3] = $TempArray2[1] & ":" & $TempArray2[2] _
            then Return
    Next

This is a 1 line statement inside a loop

Edited by Linux

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"

Share this post


Link to post
Share on other sites

Cheers

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