Sign in to follow this  
Followers 0
lockito

Passing an URL like an argument of a function

6 posts in this topic

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?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thank you very much michaelslamet, your solution is perfect!!

Share this post


Link to post
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
Sign in to follow this  
Followers 0