Jump to content
Sign in to follow this  
lolp1

Problem with expression

Recommended Posts

lolp1

Elseif $RetryCount > or == $MaxRetrys Then

This is a bad expression it says, whats wrong with it?

Share this post


Link to post
Share on other sites
Danny35d

Elseif $RetryCount > or == $MaxRetrys Then

This is a bad expression it says, whats wrong with it?

Elseif $RetryCount >= $MaxRetrys Then

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites
lolp1

Elseif $RetryCount >= $MaxRetrys Then

Your solution works, but why doesn't mine? Would like to understand why my code is working/not working.

Share this post


Link to post
Share on other sites
Danny35d

Your should be like:

Elseif $RetryCount > $MaxRetrys or $RetryCount == $MaxRetrys Then


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites
Gif

Your should be like:

Elseif $RetryCount > $MaxRetrys or $RetryCount == $MaxRetrys Then

probably the double = no reason for them .....

Share this post


Link to post
Share on other sites
Danny35d

probably the double = no reason for them .....

Don't know what is trying to do, but if need to be case sensitive then you need == otherwise = will ignore upper or lower case.

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites
Davo

Elseif $RetryCount > or == $MaxRetrys Then

This is an illegal expression in any language I can think of. The suntax for what you are trying to do is as described above, ">=" which stands for Greater then OR equal to. This is a general syntax problem in which the compiler does not understand what you are trying to do.For a list of operators used in autoit search the index for Operators.

:)

Dave


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

Share this post


Link to post
Share on other sites
PsaltyDS

Don't know what is trying to do, but if need to be case sensitive then you need == otherwise = will ignore upper or lower case.

But if case is an issue, it's a string compare and '>' is invalid. So it's just wrong all around.

For numeric: >=

For string: ==

Can't mix 'em.

:)


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

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  

×