CaptainBeardsEyesBeard Posted March 14, 2018 Share Posted March 14, 2018 Hi how do I have a function that parses 2 strings I thought you would do it like this: Main program Test2Add_A_Matter(ABE111, ABE118-1274576) Function header Func Test2Add_A_Matter(String $ClientNumber, String $MatterNumber) but I'm getting the below >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\EliteAutomation\TestMain.au3" "C:\EliteAutomation\TestMain.au3" (36) : ==> Unknown function name.: Test2Add_A_Matter(ABE111, ABE118-1274576) Test2Add_A_Matter(^ ERROR Link to comment Share on other sites More sharing options...
Subz Posted March 14, 2018 Share Posted March 14, 2018 (edited) Func Test2Add_A_Matter($sClientNumber, $sMatterNumber) You don't have to declare the parameters as strings. Normally I append the variable with $s to show that it is a string, see https://www.autoitscript.com/wiki/Best_coding_practices for more info Edited March 14, 2018 by Subz Link to comment Share on other sites More sharing options...
Zedna Posted March 14, 2018 Share Posted March 14, 2018 (edited) Something like this Test2Add_A_Matter('ABE111', 'ABE118-1274576') Func Test2Add_A_Matter($ClientNumber, $MatterNumber) ; your code ... EndFunc Edited March 14, 2018 by Zedna Earthshine 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
CaptainBeardsEyesBeard Posted March 14, 2018 Author Share Posted March 14, 2018 Just tried that and got this >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\EliteAutomation\TestMain.au3" "C:\EliteAutomation\TestMain.au3" (36) : ==> Unknown function name.: Test2Add_A_Matter(ABE111, ABE118-1274576) Test2Add_A_Matter(^ ERROR >Exit code: 1 Time: 5.113 Link to comment Share on other sites More sharing options...
CaptainBeardsEyesBeard Posted March 14, 2018 Author Share Posted March 14, 2018 (edited) Silly me forgot to use quotation marks Working now! Thanks Edited March 14, 2018 by CaptainBeardsEyesBeard Earthshine 1 Link to comment Share on other sites More sharing options...
Subz Posted March 14, 2018 Share Posted March 14, 2018 Soz missed the quotes in the calling function. 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