Page 1 of 1 1
Topic Options
#127956 - 04/10/15 12:38 PM Create a variable “@variable”…?!
Larve_Q Offline
Fresh Scripter

Registered: 04/10/14
Posts: 8
Hi all,

Can I use an “If” in a variable, something like this:

$Gateway = EnumIPInfo(0,3)
;
If $Gateway = x.x.x.x $Updates = 666
Else $Updates = 100
EndIf

I hope you guys can help me!

Gtz.

Larve

Top
#127957 - 04/10/15 01:09 PM Re: Create a variable “@variable”…?!
Richard H. Administrator Offline
Administrator
*****

Registered: 00/01/24
Posts: 4945
Loc: Leatherhead, Surrey, UK
Quote:

Hi all,

Can I use an “If” in a variable, something like this:

$Gateway = EnumIPInfo(0,3)
;
If $Gateway = x.x.x.x $Updates = 666
Else $Updates = 100
EndIf

I hope you guys can help me!

Gtz.

Larve





Sure, but don't forget that it is a string value:
Code:

$Gateway=EnumIpInfo(0,3)

Select
Case $Gateway="1.2.3.4"
$Updates="foo"
Case $Gateway="2.3.4.5"
$Updates="bar"
Case "Default"
$Updates="default"
EndSelect


Top
#127958 - 04/10/15 02:00 PM Re: Create a variable “@variable”…?!
Larve_Q Offline
Fresh Scripter

Registered: 04/10/14
Posts: 8
Just the thing I needed.

Now I can deploy my updates from a different location if one of my portable users logging on in an other AD site.

Thanks a lot...!

Gtz

Larve

Top
#127959 - 04/10/15 04:38 PM Re: Create a variable “@variable”…?!
Les Offline
KiX Master
*****

Registered: 01/06/11
Posts: 12734
Loc: fortfrances.on.ca
What about @Site?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#127960 - 04/10/15 04:49 PM Re: Create a variable “@variable”…?!
Larve_Q Offline
Fresh Scripter

Registered: 04/10/14
Posts: 8
Ahh, good one! I think I gonna test that.


Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (green78) and 144 anonymous users online.
Newest Members
Keris2112, Jorromans, qrstuv140696, Bloodboy, NIJAKIX
17451 Registered Users

Generated in 0.066 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org