Sign in to follow this  
Followers 0
NextCode

Help with Code

8 posts in this topic

First off all thank you for reading my question and sorry for the ugly inglish , i from Brasil

i need to translate this code i made on vb6 to change for Autoit

Function Decoder(ByVal A As String)

Dim Y() As Byte, Z As Long

Y = A

For Z = UBound(Y) - 1 To 0 Step -2

Decoder = Decoder & Chr$(Y(Z) - 1)

Next Z

End Function

I make like this

Func Decode($Str)

$i = int

For $i = 1 To StringLen($Str)

$i = $i & Chr(Asc(StringMid ($Str, $i, 1)) - 8)

Next

EndFunc

But its wrong , I a newbie on AutoIt so hope they dont mad me

Thanks for help and sorry if is not a place for question ,

regards

Share this post


Link to post
Share on other sites



anyone can help with explain the code ? thanks a lot or this

Share this post


Link to post
Share on other sites

thanks a lot man , work perfects for me now because you show me the way , thanks again man

Share this post


Link to post
Share on other sites

Only one more question , I make this based on your code and copy

Ported to AutoIt

Func Decode($Str)
Local $result
Local $Y
Local $Z
$Y = $Str
For $Z = UBound($Y) - 1 To 0 Step -2
$result = $result & Chr($Y($Z) - 1)
Next
Return $result
EndFunc

But dont Works , Thanks a Lot for help

My Code Original on VB6

Function sDecode(ByVal zNull As String)

Dim Y() As Byte, Z As Long

Y = zNull

For Z = UBound(Y) - 1 To 0 Step -2

sDecode = sDecode & Chr$(Y(Z) - 1)

Next Z

End Function

Share this post


Link to post
Share on other sites

works fine now man , thanks a lot for your time and your help dude , resolved , thanks

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