-
Posts
18 -
Joined
-
Last visited
-
Days Won
1
Reputation Activity
-
ChenYangHuan got a reaction from Earthshine in Please Convert it to Autoit Thank everyone
Dear Mr. Melba23
I apologize for my childhood actions 😆😆 When I reviewed the posts, I thought it was weird!
Thank you guinness!
It may have been a long time since I returned to this forum. That day I was just a student, and now I am a programmer with a stable income.
Starting with AutoIT, when I look back there are many shortcomings in thinking, but that is the foundation.
Once again thank everyone!
-
ChenYangHuan got a reaction from Musashi in Please Convert it to Autoit Thank everyone
Dear Mr. Melba23
I apologize for my childhood actions 😆😆 When I reviewed the posts, I thought it was weird!
Thank you guinness!
It may have been a long time since I returned to this forum. That day I was just a student, and now I am a programmer with a stable income.
Starting with AutoIT, when I look back there are many shortcomings in thinking, but that is the foundation.
Once again thank everyone!
-
ChenYangHuan got a reaction from KaFu in Please Convert it to Autoit Thank everyone
Dear Mr. Melba23
I apologize for my childhood actions 😆😆 When I reviewed the posts, I thought it was weird!
Thank you guinness!
It may have been a long time since I returned to this forum. That day I was just a student, and now I am a programmer with a stable income.
Starting with AutoIT, when I look back there are many shortcomings in thinking, but that is the foundation.
Once again thank everyone!
-
ChenYangHuan got a reaction from Jos in Please Convert it to Autoit Thank everyone
Dear Mr. Melba23
I apologize for my childhood actions 😆😆 When I reviewed the posts, I thought it was weird!
Thank you guinness!
It may have been a long time since I returned to this forum. That day I was just a student, and now I am a programmer with a stable income.
Starting with AutoIT, when I look back there are many shortcomings in thinking, but that is the foundation.
Once again thank everyone!
-
ChenYangHuan got a reaction from votrununghanarc in Internet 3G Manager
In Code.zip when zip i zip all file, so file: Main.au3 in source. This file is file i test when write code. You can delete it!! File Internet 3G is main!
-
ChenYangHuan got a reaction from JohnOne in Please Convert it to Autoit Thank everyone
This complete code: :sweating:
$var=_Encode("Chen Yang Huan") ClipPut(_Encode("Chen Yang Huan")) MsgBox(0,"",_Decode("4374D90DCA86DD6710B21E7603")) ;~ ///////////////////////////////////////////////////// ;~ ///////////////////////////////////////////////////// Func _Encode($Text) Local $Result="" $x=Int(StringLen($Text)/8) If $x<>StringLen($Text)/8 Then $x+=1 For $i=1 To $x $Result&=_8bitTo7bit(StringLeft($Text,8)) If $i<>$x Then $Text=StringMid($Text,9) Next Return $Result EndFunc Func _Decode($Text) Local $Result="" $x=Int(StringLen($Text)/14) If $x<>StringLen($Text)/14 Then $x+=1 For $i=1 To $x $Result&=_HexToString(_7bitTo8bit(StringLeft($Text,14))) If $i<>$x Then $Text=StringMid($Text,15) Next Return $Result EndFunc Func _7bitTo8bit($Text) Local $Result="" Local $Septets[7], $Octets[8] For $i=0 To 6 $Septets[$i]=_HexToBinaryString(StringMid($Text,$i*2+1,2)) If $Septets[$i]="" Then ExitLoop Next $LengTh=0 If $i=7 And StringLeft($Septets[$i-1],7)="0001101" Then $LengTh=7 EndIf If $i=7 And StringLeft($Septets[$i-1],7)<>"0001101" Then $LengTh=8 EndIf For $j=$i-1 To 0 Step -1 If $j=0 Then $Octets[$j]=StringRight($Septets[$j],7) $Result=_BinaryToHexString($Octets[$j])&$Result ExitLoop EndIf If $LengTh=7 Then $LengTh=0 EndIf If $LengTh=8 Then $LengTh=0 $Octets[7]=StringLeft($Septets[6],7) EndIf If $LengTh=0 Then $Octets[$j]=StringRight($Septets[$j],7-$j)&StringLeft($Septets[$j-1],$j) $Result=_BinaryToHexString($Octets[$j])&$Result EndIf Next If $Octets[7]<>"" Then $Result&=_BinaryToHexString($Octets[7]) Return $Result EndFunc Func _8bitTo7bit($Text) Local $Result="" Local $Septets[7], $Octets[8] For $i=0 To 7 $Octets[$i]=StringMid(_HexToBinaryString(StringMid(_StringToHex($Text),$i*2+1,2)),2) If $Octets[$i]="" Then If $i=7 Then $Octets[$i]="0001101" ExitLoop EndIf Next For $i=0 To 6 $Septets[$i]=StringRight($Octets[$i+1],$i+1)&StringLeft($Octets[$i],7-$i) If $Septets[$i]<>"" Then If StringLen($Septets[$i])<8 Then For $j=1 To 8 - StringLen($Septets[$i]) $Septets[$i]="0"&$Septets[$i] Next EndIf $Result&=_BinaryToHexString($Septets[$i]) Else ExitLoop EndIf Next Return $Result EndFunc Func _BinaryToHexString($BinaryValue) Local $test, $Result = '',$numbytes,$nb If StringRegExp($BinaryValue,'[0-1]') then if $BinaryValue = '' Then SetError(-2) Return endif Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') #region check string is binary $test = stringreplace($BinaryValue,'1','') $test = stringreplace($test,'0','') if $test <> '' Then SetError(-1);non binary character detected Return endif #endregion check string is binary #region make binary string an integral multiple of 4 characters While 1 $nb = Mod(StringLen($BinaryValue),4) if $nb = 0 then exitloop $BinaryValue = '0' & $BinaryValue WEnd #endregion make binary string an integral multiple of 4 characters $numbytes = Int(StringLen($BinaryValue)/4);the number of bytes Dim $bytes[$numbytes],$Deci[$numbytes] For $j = 0 to $numbytes - 1;for each byte ;extract the next byte $bytes[$j] = StringMid($BinaryValue,1+4*$j,4) ;find what the dec value of the byte is for $k = 0 to 15;for all the 16 possible hex values if $bytes[$j] = $bits[$k+1] Then $Deci[$j] = $k ExitLoop EndIf next Next ;now we have the decimal value for each byte, so stitch the string together again $Result = '' for $l = 0 to $numbytes - 1 $Result &= Hex($Deci[$l],1) Next return $Result Else Return EndIf EndFunc ; Hex To Binary Func _HexToBinaryString($HexValue) Local $Allowed = '0123456789ABCDEF' Local $Test,$n Local $Result = '' if $hexValue = '' then SetError(-2) Return EndIf $hexvalue = StringSplit($hexvalue,'') for $n = 1 to $hexValue[0] if not StringInStr($Allowed,$hexvalue[$n]) Then SetError(-1) return 0 EndIf Next Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $Result &= $bits[Dec($hexvalue[$n])+1] Next Return $Result EndFunc Func _HexToString($strHex) If StringLeft($strHex, 2) = "0x" Then Return BinaryToString($strHex) Return BinaryToString("0x" & $strHex) EndFunc Func _StringToHex($strChar) Return Hex(StringToBinary($strChar)) EndFunc -
ChenYangHuan got a reaction from JohnOne in Please Convert it to Autoit Thank everyone
I try to read understanding_sms.pdf and try to write but then i don't know if sms length >8T
This code:
#include <String.au3> MsgBox(0,"",Encode("SMS RulzSMS Rulz")) ;~ Code Func Encode($Text) $x=StringLen($Text)/8 If StringLen($Text)/8<>Round(StringLen($Text)/8) Then $x=$x+1 $Result="" For $i=1 To $x $Result&=To7bit(StringLeft($Text,8)) If $i<>$x Then $Text=StringMid($Text,9) Next Return $Result EndFunc Func To7bit($Text) $Text=_StringToHex($Text) Local $Array[StringLen($Text)/2+1] Local $Array2[StringLen($Text)/2] $S=StringLen($Text)/2-1 For $i=1 to StringLen($Text)/2 $Array[$i]=StringMid(_HexToBinaryString(StringLeft($Text,2)),2) $Text=StringMid($Text,3) Next For $i=1 to $S $Array2[$i]=StringRight($Array[$i+1],$i)&$Array[$i] If $i<>StringLen($Text)/2-2 Then $Array[$i+1]=StringMid($Array[$i+1],1,StringLen($Array[$i+1])-$i) Next Return _BinaryToHexString($Array2[1]&$Array2[2]&$Array2[3]&$Array2[4]&$Array2[5]&$Array2[6]&$Array2[7]) EndFunc Func _BinaryToHexString($BinaryValue) Local $test, $Result = '',$numbytes,$nb If StringRegExp($BinaryValue,'[0-1]') then if $BinaryValue = '' Then SetError(-2) Return endif Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') #region check string is binary $test = stringreplace($BinaryValue,'1','') $test = stringreplace($test,'0','') if $test <> '' Then SetError(-1);non binary character detected Return endif #endregion check string is binary #region make binary string an integral multiple of 4 characters While 1 $nb = Mod(StringLen($BinaryValue),4) if $nb = 0 then exitloop $BinaryValue = '0' & $BinaryValue WEnd #endregion make binary string an integral multiple of 4 characters $numbytes = Int(StringLen($BinaryValue)/4);the number of bytes Dim $bytes[$numbytes],$Deci[$numbytes] For $j = 0 to $numbytes - 1;for each byte ;extract the next byte $bytes[$j] = StringMid($BinaryValue,1+4*$j,4) ;find what the dec value of the byte is for $k = 0 to 15;for all the 16 possible hex values if $bytes[$j] = $bits[$k+1] Then $Deci[$j] = $k ExitLoop EndIf next Next ;now we have the decimal value for each byte, so stitch the string together again $Result = '' for $l = 0 to $numbytes - 1 $Result &= Hex($Deci[$l],1) Next return $Result Else MsgBox(0,"Error","Wrong input, try again ...") Return EndIf EndFunc ; Hex To Binary Func _HexToBinaryString($HexValue) Local $Allowed = '0123456789ABCDEF' Local $Test,$n Local $Result = '' if $hexValue = '' then SetError(-2) Return EndIf $hexvalue = StringSplit($hexvalue,'') for $n = 1 to $hexValue[0] if not StringInStr($Allowed,$hexvalue[$n]) Then SetError(-1) return 0 EndIf Next Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $Result &= $bits[Dec($hexvalue[$n])+1] Next Return $Result EndFuncunderstanding_sms.pdf