-
Posts
20 -
Joined
-
Last visited
-
Days Won
1
Jowy last won the day on February 28 2018
Jowy had the most liked content!
Recent Profile Visitors
269 profile views
Jowy's Achievements

Seeker (1/7)
12
Reputation
-
xekon reacted to a post in a topic: ResourcesEx UDF.
-
@jcpetu, always try to convert everything to binary before working on any file. Working with binary, you would convert whatever file you want and also any kind of file can be be used and for instance ppt and pdf. However, for your Hint , convert it to binary and add it to the end of the file. When reading/writing file, use the $FO_BINARY flag in the read/write file. In that case you will succeed. But, make sure the number of bytes read/written when encrypting and decrypting a file are the same. If I have time, I could write for you a function showing you this behavior, but I'm just giving you a hint .
-
@guinness, thanks for the great work. But when I compiled my script on the new AutoIT version, the ResourcesEx.au3 needs an include file: #include <WinAPISysWin.au3> needed by _WinAPI_SetWindowLong Regards, Jowy
-
adelbak reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
Earthshine reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
Jowy changed their profile photo
-
@Earthshine, you are right, I checked the zip file and it was infected. I checked this on my mac with Bitdefender. I appreciate from moderators or owners here to delete the zip file as soon as possible @Jon . Meanwhile, I checked the exe file from XDA and it's not infected. Maybe the machine that adelbak is using is infected.. @adelbak, I thought you wrote this file ... I opened the GitHUB and XDA and I saw it was developed by someone else as per the attachment. I'm an XDA developer named as Jowy007 there, I appreciate from your side, whenever you publish a code that's not yours, at least, mention the developers and web links. Developers are heavy-duty workers and we should mention and respect them and their work. Thanks for understanding, Jowy
-
adelbak reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
adelbak reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
adelbak reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
adelbak reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
adelbak reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
Earthshine reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
Jowy reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
Earthshine reacted to a post in a topic: Please, Can anyone translate this C small function to autoit
-
@Earthshine, I agree with you, I wrote the code so @adelbak can learn how can be done in AutoIT, but for sure next time he will do things by his own. Also, the trick is not actually by writing the function only, it was also by saving the output to a file, because showing a message box by itself and trying to write the string will not solve the issue as 4 bytes of data for every char will be written, but instead we have to have 1 byte for every char. That's why I wrote all the whole script
-
Here you go @adelbak, I need to mention that you can pass as many IMEIs params as you want, it's not limited to 1 or 2 params #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Written by Jowy ; Creation of IMEI file ; Creation Date: 28/02/2018 #Region Include #include <FileConstants.au3> #include <Array.au3> #include <String.au3> #EndRegion Include #Region Variables #cs test params: 531302165213560 501939357823635 Global Const $sStr = "357369035621901" #ce Global Const $aOutMask = [0xAB, 0xA0, 0x6F, 0x2F, 0x1F, 0x1E, 0x9A, 0x45, 0x0, 0x0, 0x0, 0x0] Global $hOutputFile = 0 Global Const $sOUT_FILE = "MP0B_001_NEW" Global Const $iZero = Asc("0") Global $sFileContent = "" #EndRegion Variables #Region Main ;~ check if no parameters where provided; i.e. no imei If $CmdLine[0] = 0 Then PrintUsage() Exit 1 EndIf For $i = 1 To $CmdLine[0] ConsoleWrite("New IMEI " & $i & " (15 digits): " & $CmdLine[$i] & @CRLF) Local $aReturn = ParseIMEI($CmdLine[$i]) If Not @error Then WriteToFile($aReturn) Else ConsoleWrite("Invalid IMEI " & $CmdLine[$i] & " format!" & @CRLF) CloseFile() Exit 1 EndIf Next ConsoleWrite("New IMEI in file = " & $sOUT_FILE & @CRLF) CloseFile() #EndRegion Main #Region Functions Func CloseFile() If $hOutputFile <> 0 Then FileClose($hOutputFile) EndIf EndFunc ;==>CloseFile Func WriteToFile(ByRef $aArray) If $hOutputFile = 0 Then $hOutputFile = FileOpen(@ScriptDir & "\" & $sOUT_FILE, $FO_OVERWRITE + $FO_ANSI) ; I'm using overwrite, so if previous file exists, it will be overwritten. EndIf If $hOutputFile <> -1 Then For $xItem In $aArray FileWrite($hOutputFile, BinaryMid($xItem, 1, 1)) Next Else ConsoleWrite("Unable to open file for writing !" & @CRLF) Exit 1 EndIf EndFunc ;==>WriteToFile Func PrintUsage() ConsoleWrite("Usage: " & @CRLF & @ScriptName & " <IEMI_1 15 digits> [IMEI_2 15 digits] ... [IMEI_X 15 digits]" & @CRLF) EndFunc ;==>PrintUsage Func ParseIMEI($sIMEI) Local $aOutput If StringLen($sIMEI) = 15 And StringIsDigit($sIMEI) Then $aOutput = Calc_IMEI($sIMEI) Return SetError(0, 0, $aOutput) Else Return SetError(1, 1, "") EndIf EndFunc ;==>ParseIMEI Func Calc_IMEI($sInput) Local $j = 0 Local $aOutput[12] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ;~ Local $aInput = StringRegExp($sInput, "(?i)(\d)", 3) Local $aInput = StringToASCIIArray($sInput) ;~ _ArrayDisplay($aInput) For $i = 0 To UBound($aInput) - 1 Step 2 ; (15 - 1 = 14) ;~ since $sInput is always having digits from 0 to 9, there is no need to check any digit as all the string have been checked $aOutput[$j] = ($aInput[$i] - $iZero) If $i >= 14 Then ExitLoop EndIf $aOutput[$j] += BitShift(($aInput[$i + 1] - $iZero), -4) $aOutput[$j] = BitXOR($aOutput[$j], $aOutMask[$j]) $j += 1 Next $aOutput[$j] = BitXOR($aOutput[$j], $aOutMask[$j]) $aOutput[8] = 0x57 $aOutput[9] = 0xDB $aOutput[10] = 0 $aOutput[11] = 0 For $i = 0 To 9 If BitAND($i, 0x1) Then $aOutput[11] += $aOutput[$i] Else $aOutput[10] += $aOutput[$i] EndIf Next Return $aOutput EndFunc ;==>Calc_IMEI #EndRegion Functions Here are my results:
-
Jowy reacted to a review on a file: ADO.au3 UDF
-
Hello adelbak, I need to ask you a question: Are you intending to increment twice the "i" variable in the for loop ? the first for statement initialize i to 0 and j to 0 and an the end of the for loop, I can see is i++, which means, you are incrementing "i" by 1 and also, the for loop when it reaches the close brace "}" will also check for the condition if "i" still less than 15 , if that ok, also increment "i" again. So you are incrementing "i" twice . Also, I can see that you are incrementing "j" at the same time. My question is : Are you intentionally incrementing "i" twice ? if yes, then last "i++" should be removed and then the for loop at the beginning should be like this if I understood your code correctly: int i=0, j=0; //for (i=0, j=0; i < 15; i++, j++) for (; i < 15;) { if (inp_imei[i] < '0' || inp_imei[i] > '9') { return 1; } out_imei[j] = (inp_imei[i] - '0'); if (i >= 14) break; if (inp_imei[i+1] < '0' || inp_imei[i+1] > '9') { return 1; } out_imei[j] += ((inp_imei[i+1] - '0') << 4); out_imei[j] = out_imei[j] ^ out_mask[j]; //i++; i+=2; j++; } is that what you intended ? to increment "i" twice ? and "j" will be always incremented to 1 ?
-
Jowy reacted to a post in a topic: How to post code on the forum
-
Sure Next time will put the code, it wasn't interesting code actually, it was the examples and codes from other links proposed from guys in the forum and from the Examples code that comes with AutoIT. Next time, I'll put the code. I was only showing the DPI resolution difference.
-
Thanks Melba, it wasn't interesting code actually, it was the examples and codes from other links proposed from guys in the forum and from the Examples code that comes with AutoIT. Next time, I'll put the code.
-
Hello @RTFC, I have tried the code inside, but it's giving me null for width and height... Anyway, it seems I'll go back for the workaround of scale factor multiplied by each x,y,w,h... , in the workaround, I can at least stretch even the window width on hi-dpi screens.
-
Now, applying the example with the following and building the Example, check please the following screenshot: the 2 windows is small, one I replied yes for DPI awareness and the other I answered no. I run the exe file from explorer. But if I run through the editor with F5 (with GO option), and since the editor is not DPI aware, for sure you will have same results whether you say yes or no for DPI.
-
As far as I know , the AppliedDPI is the one showing the scaling...