Jump to content

[Help] [Simple] If else / While


Recommended Posts

Hey :)

I'm pretty new with AutoIt and just finding my way to it. I have read myself through this forum but I can't figure out what the problem with my code is.
I can compile it but when I want to excecute it a get this Error Message:
Line 1 (File E "E..... my pfad):

Error: Unknown function name.

Here is my code:

abc = 1

while abc > 51

   If (abc > 50) Then
      SEND("b")
      a = a++

   Else
      SEND("c")
      a = a++

   EndIf
WEnd

 

Thanks a lot

Paz
 

Link to comment
Share on other sites

  • Moderators

For variables, you need to preface with $ character. It thinks you are calling a function named abc

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

As Jos is suggesting, it looks like you are trying to jump both feet first into coding without doing any reading. I would suggest you start on our Wiki, and actually learn a few of the concepts, to save yourself additional frustration.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Once again, if you declare something as a Constant, meaning it NEVER changes, why are you surprised you're receiving an error when you try to change its value?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...