lockito Posted December 16, 2013 Share Posted December 16, 2013 Hi!! I want to create a function that recieves an URL like argument. I created the function in this way: Func test(Const $link1) And i tried to call the function in these 2 ways: 1) test("https://www.google.com") 2) Call("test", "https://www.google.com") The script compiles but in execution it returns an error on the callings of the function Can anybody help me? Link to comment Share on other sites More sharing options...
Solution michaelslamet Posted December 16, 2013 Solution Share Posted December 16, 2013 Hi, Try this: test("https://www.google.com") Func test($link1) EndFunc Link to comment Share on other sites More sharing options...
markyrocks Posted December 16, 2013 Share Posted December 16, 2013 Idk what the desired output is but I'd guess the above isn't going to automatically open ie and enter that into the address bar and go there. That may just be stating the obvious but you never know. Spoiler "I Believe array math to be potentially fatal, I may be dying from array math poisoning" Link to comment Share on other sites More sharing options...
JohnOne Posted December 16, 2013 Share Posted December 16, 2013 The code you wrote here is not failing something else is. _Test("http://www.autoitscript.com/forum/topic/157061-passing-an-url-like-an-argument-of-a-function/") Func _Test(Const $Link) MsgBox(0,"URL", $Link) EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
lockito Posted December 16, 2013 Author Share Posted December 16, 2013 Thank you very much michaelslamet, your solution is perfect!! Link to comment Share on other sites More sharing options...
JohnOne Posted December 16, 2013 Share Posted December 16, 2013 Except the local variable that you wanted constant, is not constant. jaberwacky 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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