Slingshot Posted April 14, 2006 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share Posted April 14, 2006 maybe Func AddAll() 8) Link to comment Share on other sites More sharing options...
Slingshot Posted April 14, 2006 Author Share Posted April 14, 2006 Then it says AddAll ^ERROR Error: Error parsing function call Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 14, 2006 Moderators Share 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. Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share 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) Link to comment Share on other sites More sharing options...
greenmachine Posted April 15, 2006 Share 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 Link to comment Share on other sites More sharing options...
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