Jump to content
Sign in to follow this  
gagaga

Variables in a URL?

Recommended Posts

gagaga

Hi, I was wondering how could I put changing variables in a url?

heres my code:

$x = "hi"

ShellExecute("https://www.google.com/=www&say=$x") ; just example url

I tried to search answer but couldnt find.. any help?

Share this post


Link to post
Share on other sites
TehWhale

$x = "high"

ShellExecute("https://www.google.com/=www&say=" & $x)

Share this post


Link to post
Share on other sites
furrycow

Hi, I was wondering how could I put changing variables in a url?

heres my code:

$x = "hi"

ShellExecute("https://www.google.com/=www&say=$x") ; just example url

I tried to search answer but couldnt find.. any help?

I dont get it...that looks fine??

I mean at the moment, $x is always going to be "hi", is it that value you want to change..and if so, what are other results do you want $x to change it to, or where are you getting the other results for $x from??


Instant Lockerz Invite - www.instantlockerzinvite.co.uk

Share this post


Link to post
Share on other sites
TehWhale

To use variables and a literal string you must use & to conjoin them. For example:

$Variable1 = "cal"
$Variable2 = "wmplayer"
$Variable3 = "mspaint"

Shellexecute($variable1 & "c")
ShellExecute("mspaint " & $Variable2)

You cannot use: "String $Variable" as it will take $Variable as a literal string and write that.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.