Slingshot Posted April 14, 2006 Posted April 14, 2006 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
Slingshot Posted April 14, 2006 Author Posted April 14, 2006 Then it says AddAll ^ERROR Error: Error parsing function call
Moderators SmOke_N Posted April 14, 2006 Moderators Posted April 14, 2006 Then it says AddAll ^ERROR Error: Error parsing function callWhat Valuater is saying is you should make your functions like:Func AddAll() If WinActive("Outlook Express","") Then Send("{APPSKEY}") Send("{SHIFTDOWN}b{SHIFTUP}") EndIf EndFuncWith 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.
Valuater Posted April 14, 2006 Posted April 14, 2006 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)
greenmachine Posted April 15, 2006 Posted April 15, 2006 To reinforce the above, function definitions are made like this: Func MyFunc() ; stuff EndFunc Function calls are made like this (using the above example): MyFunc(); calls MyFunc
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now