Sign in to follow this  
Followers 0
caramen

How to remove a part of a returned value ?

3 posts in this topic

#1 ·  Posted (edited)

Hi all

How to remove a part of a returned value ?

The value will be some like C:PROGRA~1COMMON~1SYMANT~1VIRUSD~120090907.050

I need only this: 20090907.050

if you need the code just say me but it s not needed i guess

It is only a part of code with a regread and the returned value is here so...

Thx guys

For help you to understand i give you my logic:

RegRead: OK

$Value = C:PROGRA~1COMMON~1SYMANT~1VIRUSD~120090907.050

$Result= (C:PROGRA~1COMMON~1SYMANT~1VIRUSD~120090907.050) - (C:PROGRA~1COMMON~1SYMANT~1VIRUSD~1)

$result= 20090907.050

GuiCtrlSetData ($ID1 , ""&$Result)

 

How can i get the result  ?

Edited by caramen

Share this post


Link to post
Share on other sites



Simple StringSplit usage

$Value = "C:\PROGRA~1\COMMON~1\SYMANT~1\VIRUSD~1\20090907.050"

$split = StringSplit($Value, "\")
$result= $split[$split[0]]
Msgbox(0,"", $result)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Working like a charme :)

Thx

 
;Detection de la definition virus   
;Decoupage du resultat   
Local $Split = StringSplit($Reg3,"\")   
Local $Resulta = $Split [$Split[0]]   
GUICtrlSetData ($ScanSEPDEF , "Def. SEP: "&$Resulta)
Edited by caramen

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