Jump to content

Function Error!


Recommended Posts

Hi i was wondering if you could tell me where im going wrong for trying to call a function, it says

Func AddAll

Error:Badly formatted "Func" statement.

heres the code:

Func AddAll 
    If WinActive("Outlook Express","") Then
    Send("{APPSKEY}")
    Send("{SHIFTDOWN}b{SHIFTUP}")
    EndIf
EndFunc

Thanks :think:

Link to comment
Share on other sites

  • Moderators

Then it says

AddAll

^ERROR

Error: Error parsing function call

What Valuater is saying is you should make your functions like:
Func AddAll()
    If WinActive("Outlook Express","") Then
    Send("{APPSKEY}")
    Send("{SHIFTDOWN}b{SHIFTUP}")
    EndIf
EndFunc
With the brackets on the end.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

give this a try... there are no apparent errors

Func AddAll()
    If WinActive("Outlook Express", "") Then
        Send("{APPSKEY}")
        Send("{SHIFTDOWN}")
        Send("b")
        Send("{SHIFTUP}")
    EndIf
EndFunc  ;==>AddAll

8)

NEWHeader1.png

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