Jump to content

Adding 2 Variables Together


Recommended Posts

Quick question hopefully

Say I have the following

$OS_VERSION = @OSVERSION

$SP_VERSION = @OSServicePack

How could I get $TOTAL to equal them together with a SPACE inbetween

So that it would be $TOTAL = Win_XP Service Pack 1

I need something like $TOTAL = ($OS_VERSION( + ($SP_VERSION)

But I do not know how to write it...please help

Link to post
Share on other sites

egridley has ir correct.

To add numbers use +

To concatenate strings and variables use &

To do a Logic question use AND

ex:

1+2=3

"Foo" & "Bar"="FooBar"

if 1=1 AND 2=2 Then ; This is true

con·cat·e·nate    ( P )  Pronunciation Key  (kn-ktn-t, kn-)

tr.v. con·cat·e·nat·ed, con·cat·e·nat·ing, con·cat·e·nates

1. To connect or link in a series or chain.

2. Computer Science. To arrange (strings of characters) into a chained list.

AutoIt3, the MACGYVER Pocket Knife for computers.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...