All Activity
- Today
-
the problem is in the code above. that is, creating a progress bar. when disabling the above functions, everything works. having disabled all the other problems by changing the code, I came to the last problem. which I wrote about above. it was this part of the code that caused the freeze with a chaotic error that this or that variable was not declared. The $aDataZipPos array is written during compilation. It is a list of files
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
mLipok replied to Jos's topic in AutoIt Technical Discussion
Seams to work fine, the same in both cases. -
mLipok reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
ioa747 reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
SOLVE-SMART reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
Jos replied to Jos's topic in AutoIt Technical Discussion
Uploaded an updated Beta version of SciTE zipfiles containing a fix for the lexer colors. -
argumentum reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
Jos replied to Jos's topic in AutoIt Technical Discussion
The issue is much simpler than what I initially though... and my post was just to show how you can "simplify" the report of a bug as my example show the exact same issue as yours ...right? I think that AutoIt3 simply "assumes" the start of a comment-block is a #directive line starts with "#cs" or "#comment-start", and ends the commentblock when a #directive line starts with "#ce" or "#comment-end"... the rest is simply ignored. So i need to do the same in the lexer and color anything after the keywords as comment-bock. -
mLipok reacted to a post in a topic: WebP v0.3.3 build 2025-06-04 beta
- Yesterday
-
Glad you solved the frustrating problem @mLipok. And also sorry to hear about the stresses and discouragements you have had to face in recent times. I am also glad to hear things are looking up for you. I would also like to echo your sentiment, and thank Jos for his hard work on this (frequently) thankless task. I feel it has turned out great. A time or two I have reverted to Scite v4, and find I very quickly miss the new features of v5. Sorry for the discouragements Jos, and lack of testing/assistance at times. Wishing you the best in your future projects. Best regards, Donny
-
donnyh13 reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
donnyh13 reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
donnyh13 reacted to a post in a topic: BETA: SciTE v5x & lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs
-
SOLVE-SMART reacted to a post in a topic: Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
-
mLipok reacted to a post in a topic: Functional "class" solution
-
I had some issue with attacing to existing chrome. But it was very wired. First of all log: some findings: https://issues.chromium.org/issues/42323720 As you know I know about this: Finally I was able to attach to runing Chrome instances and this usually works fine. Today my situation was like this: I was working on automating a certain portal, to which a client logged in. This portal is something like an email box. To make sure that the page would not log me out, I refreshed the page every few minutes or clicked on some of its elements (inbox, trash, sent, etc.). I wrote 20 lines of code and did tests by connecting to an existing session. another 20 lines.... another 20 lines.... another 20 lines.... After about 2 hours of such work, the error that I mention above appeared. The log comes from the connection creation stage, i.e. the part of the code that I did not change. Simply refreshing the browser F5 did not help - unfortunately I did not check CTRL+F5 (or CTRL+SHIFT+R) that should perform a "hard refresh". Interestingly, the only solution that helped was manually navigating to another page within the same browser tab, and then navigating again to the automated portal, which fortunately did not log me out. Question: Do you have any idea why manually navigating to another portal and navigating back to the desired portal solves this problem? btw. Today I did reasarch on Au3Forum and I saw other related question - quite fresh - I think they may be related to my issue:
-
- webdriver
- webdriver udf
-
(and 2 more)
Tagged with:
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
mLipok replied to Jos's topic in AutoIt Technical Discussion
I would say that it really is "Wrongly highlighted" but I think this imp can be turned into something useful (to have colored different syntax, with background like in comment blocks) which can became handy in case you store in AU3 code another type of code/data - some XML, JSON, INI snippet as a documentation to function. -
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
mLipok replied to Jos's topic in AutoIt Technical Discussion
-
I don't know if you remember, or even if I wrote about it in general on the open forum or in private chats with @Jos, but In the past I had big problems with performance on most of my projects. After replacing the computer a few years ago, from i7 3gen to a brand new DELL I5 10Gen with an NVME (Micron) drive, the problems were partially solved. The last few months were a surprise to me because I felt an unexpected, significant drop in performance (switching between different files in SciTE took me up to a dozen or so seconds). I was really pissed off. As it turned out, it was all the fault of a weak FLASH PENDRIVE drive (that's how I had my projects). Interestingly, there must have been some changes in the file subsystems or in Antiviruses, because even transferring from USB FLASH to the original DELL NVME (Micron) didn't improve the situation. A month ago I got pissed off. Using the AS SSD Benchmark tool, I performed performance tests for: USB PENDRIVE, NVME (Micron) and a regular Samsung 960 256GB NVME drive (not the PRO version) and bought a new fast Samsung 980 PRO 1TB NVME drive After installing and mirroring the system (without fresh installation), everything started working almost in the blink of an eye I'll just say that currently my new NVME is almost 10 times faster than the USB PENDRIVE and about 3 times faster than the old NVME drive (Micron). Interestingly, I wanted to continue working with the USB Pendrive, so that I could work on a portable development environment at the client's site. I looked for statistics at https://ssd-tester.pl/pendrive_test.php I bought a fast PENDRIVE and as a result, my portable work environment also works fast enough not to get frustrated. I just wanted to end this story with a happy ending by saying that my performance problem in the context of the Dynamic Lua feature only occurred to me because my INCLUDE file set contains 265 non-standard UDFs + 149 Standard AutoIt UDF files, so a total of 414 AU3 files to track by Dynamic LUA script invocation. However, if your non-standard UDF set is small, you should not have any performance problems. And if someone has a problem with the speed of operation, I recommend working on the performance of your system, with particular attention to the disk speed. Regardless of the adventures I've had, writing advanced scripts has become easier, especially if they're based on many different, often constantly modified UDFs. So I'm currently happy with how Dynamic Lua feature works, and grateful for the work @Jos put in SciTE4AutoIt.
-
This is an awesome idea and quite creative. It almost favors C#.
-
Exit a folder where a script resides!
Numeric1 replied to mr-es335's topic in AutoIt General Help and Support
Hi, The issue comes from the fact that WinClose() expects a window title, not a path. Also, trying to close a folder where the script itself is running can cause it to fail. A more reliable approach is to use WinList() to find and close any Explorer windows with matching titles: Func ExitFolders() Local $aList = WinList("[CLASS:CabinetWClass]") For $i = 1 To $aList[0][0] If StringInStr($aList[$i][0], "src\Images") Or _ StringInStr($aList[$i][0], "src") Then WinClose($aList[$i][1]) EndIf Next EndFunc -
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
mLipok replied to Jos's topic in AutoIt Technical Discussion
Thank you, I feel better day by day. -
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
Jos replied to Jos's topic in AutoIt Technical Discussion
Understood and didn't need an explanation, just wanted to clarify that I feel there are only demands and a lack of support when I ask for people to test something. This needs to be a 2-way street as far as I am concerned for me to stay motivation to spend time on it. So: Nothing personal towards you, just meant for the whole community when they want to look at me for New stuff or Support. -
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
mLipok replied to Jos's topic in AutoIt Technical Discussion
Yes, I know. But somehow it happened that I'm just trying to get back into programming after some life complications that I mentioned to you before. -
Update to: WebP v0.3.3 build 2025-06-04 beta Updated WebP x64 dll to latest version Added decoding code for animated WebP files for boths DLLs -> see Example6 and Example7 See first post for download link.
-
Good day, I hope that the day finds you well! I have the following script: ; ----------------------------------------------- #include <FileConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- CopyDocData() CopyImgData() ExitFolders() ExitText() LaunchProcedureText() LaunchMainFolder() LaunchImagesFolder() ; ----------------------------------------------- Func CopyDocData() Local $sSrcPath = "E:\~About\Word\Examples\src\Example 1.doc" ; ----------------- Local $sDstPath = "E:\~About\Word\Examples\dst" ; ----------------------------------------------- FileCopy($sSrcPath, $sDstPath, $FC_OVERWRITE) EndFunc ;==>CopyDocData ; ----------------------------------------------- Func CopyImgData() Local $sSrcPath = "E:\~About\Word\Examples\src\Images\1.png" ; ----------------- Local $sDstPath = "E:\~About\Word\Examples\dst\Images\" ;~ Local $sDstPath = "E:\~About\Word\Examples\dst\Images\1a.png" ; ----------------------------------------------- FileCopy($sSrcPath, $sDstPath, $FC_OVERWRITE) EndFunc ;==>CopyImgData ; ----------------------------------------------- Func ExitFolders() Local $sSrcPath1 = "E:\~About\Word\Examples\src\Images" Local $sSrcPath2 = "E:\~About\Word\Examples\src" Local $iFileExists1 = FileExists($sSrcPath1) Local $iFileExists2 = FileExists($sSrcPath2) ; ----------------------------------------------- If $iFileExists1 Then WinClose($sSrcPath1) EndIf ; ----------------- If $iFileExists2 Then WinClose($sSrcPath2) EndIf EndFunc ;==>ExitFolders ; ----------------------------------------------- Func ExitText() Local $sSrcPath = "E:\~About\Word\Examples\src\Procedure.txt" ; ----------------------------------------------- WinClose($sSrcPath, "") EndFunc ;==>ExitText ; ----------------------------------------------- Func LaunchProcedureText() Local $sSrcPath = "E:\~About\Word\Examples\dst\Procedure.txt" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWaitActive($sSrcPath, "") WinMove($sSrcPath, "", 1950, 25, 550, 1000) EndFunc ;==>LaunchProcedureText ; ----------------------------------------------- Func LaunchMainFolder() Local $sSrcPath = "E:\~About\Word\Examples\dst" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 2520, 25, 500, 440) EndFunc ;==>LaunchMainFolder ; ----------------------------------------------- Func LaunchImagesFolder() Local $sSrcPath = "E:\~About\Word\Examples\dst\Images" ; ----------------------------------------------- ShellExecute($sSrcPath) WinWait($sSrcPath, "") WinMove($sSrcPath, "", 2520, 475, 500, 440) EndFunc ;==>LaunchImagesFolder ; ----------------------------------------------- My "issue" is regarding the ExitFolders() section. It would appear that I am unable to exist a folder where the script actually reside!! • I know that I can move the script elsewhere, but I really do need to keep the script where it is located! Any ideas....suggestions? Thank you for your time...appreciated!
-
Wow, looks complicated. ... ;~ $aDataZipPos - array is written during compilation Func _EXMOD() If UBound($exmods) = 0 Then Return If _mExistsKey($oMod, 'info' & $CurGui) Then GUICtrlSetData(_mGetValueKey($oMod, 'info' & $CurGui), $Instjmplang[13]) _ExtractFiles($exmods, $wkdir, $aDataZipPos, @ScriptFullPath) ... "R:\JMP\fileprjt.au3"(3431,45) : warning: $aDataZipPos: possibly used before declaration. _ExtractFiles($exmods, $wkdir, $aDataZipPos, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Try forking the troublesome part of the code, so is not in the same thread. And easier to debug too. By the way, you've been here since 2013 so, you know the forum rules by now.
-
I have to admit that the solution was partial I found the problem. Below is a part of the code describing the problem ;~ when using this function, an error occurs "Variable is used without being declared" ;~ The variable can be random from the code. All variables are declared $iTimerProgress = _Timer_SetTimer($WOTP, 30, 'PlayAnim') ;~ Or ;~ If you use these lines, the program freezes for some users. GUIRegisterMsg($WM_TIMER, "PlayAnim") DllCall("user32.dll", "int", "SetTimer", "hwnd", $WOTP, "int", 0, "int", 30, "int", 0) ;~ If you don't use the progress install code, the program works fine for everyone. Func PlayAnim() $hHBmp_BG = _GDIPlus_StripProgressbar($iPercData, $WPerc, $HPerc, $iVisPerc, $BgColorGui, $FgBGColor, $BGColor, $TextBGColor, $sFontProgress) Local $hB = GUICtrlSendMsg($iPercId, 0x0172, 0, $hHBmp_BG) If $hB Then _WinAPI_DeleteObject($hB) _WinAPI_DeleteObject($hHBmp_BG) EndFunc ;==>PlayAnim Func _GDIPlus_StripProgressbar($fPerc, $iW, $iH, $iVisP = 1, $iBgColorGui = 0x000000, $iFgColor = 0x808080, $iBGColor = 0x0000FF, $iTextColor = 0xFFFFFF, $sFont = 'Arial Black') Local $sPerc = Ceiling($fPerc) If $sPerc < 0 Then $sPerc = 0 If $sPerc > 100 Then $sPerc = 100 _GDIPlus_Startup() Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) _GDIPlus_GraphicsClear($hCtxt, 0xFF000000 + $iBgColorGui) Local $iWidth = $iH * 2, $iLen = $iWidth / 2, $iY Local $hBmp = _GDIPlus_BitmapCreateFromScan0($iWidth, $iH) Local Const $hCtxt_Bmp = _GDIPlus_ImageGetGraphicsContext($hBmp) _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt_Bmp, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local $hPen = _GDIPlus_PenCreate(0xFF0000000 + $iFgColor), $iPenSize = Int($iH / 12) Local $hPen2 = _GDIPlus_PenCreate(0x50000000, $iPenSize) _GDIPlus_GraphicsClear($hCtxt_Bmp, 0xFF000000 + $iBGColor) Local Static $iX = 0 For $iY = 0 To $iH - 1 _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY, $iY, -$iX + $iY + $iLen, $iY, $hPen) _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY + 2 * $iLen, $iY, -$iX + $iY + 3 * $iLen, $iY, $hPen) Next Local $tPoint1 = DllStructCreate('float;float') Local $tPoint2 = DllStructCreate('float;float') DllStructSetData($tPoint1, 1, $iW / 2) ;x1 DllStructSetData($tPoint2, 1, $iW / 2) ;x2 _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, 0, $iWidth, 0, $hPen2) $iX = Mod($iX + 2, $iWidth) Local $hTextureBrush = _GDIPlus_TextureCreate($hBmp) _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $sPerc / 100 * $iW, $iH, $hTextureBrush) If $iVisP Then _GDIPlus_GraphicsSetTextRenderingHint($hCtxt, 5) Local $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $iTextColor) Local $hFormat = _GDIPlus_StringFormatCreate() Local $hFamily = _GDIPlus_FontFamilyCreate($sFont) Local $hFont = _GDIPlus_FontCreate($hFamily, $iH * 2.5 / 5, 2) Local $tLayout = _GDIPlus_RectFCreate(0, 0, $iW, $iH) _GDIPlus_StringFormatSetAlign($hFormat, 1) _GDIPlus_GraphicsDrawStringEx($hCtxt, $sPerc & '%', $hFont, $tLayout, $hFormat, $hBrush) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) EndIf _GDIPlus_PenDispose($hPen) _GDIPlus_PenDispose($hPen2) _GDIPlus_GraphicsDispose($hCtxt) _GDIPlus_GraphicsDispose($hCtxt_Bmp) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_BrushDispose($hTextureBrush) Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() Return $hHBITMAP EndFunc ;==>_GDIPlus_StripProgressbar The attached file contains the entire program code What did I do wrong? the code cannot be run in the editor. and after compilation it will give an error it only works when compiled in the program designer. fileprjt.au3
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
Jos replied to Jos's topic in AutoIt Technical Discussion
Ok so Management summary: #cs ;Example Correctly highlighted #ce #cs= ;Example Wrongly highlighted #ce Will have a look when I feel like opening that source again as I must say I lost the motivation to work on it as in general when I ask for something there's hardly any interest. An example that involves you: Question asked and answered, with my follow-up without any response. (Not blaming, just explanation why I lost interest to work on anything dealing with SciTE4AutoIt3) -
how can i run the js by autoit3
argumentum replied to fenhanxue's topic in AutoIt General Help and Support
"Active development of CryptoJS has been discontinued. This library is no longer maintained." https://www.google.com/search?q=autoit+"AES-CBC" ..not much help but may serve as a starting point. -
This HTML file source code already contains encrypt and decrypt JS code. How can I convert it into Autoit3 code <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>AES-CBC </title> <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script> </head> <body> <div class="container"> <main> <div class="card"> <div class="input-group"> <textarea id="inputText" placeholder="">Hello</textarea> </div> <div class="btn-group"> <button class="encrypt-btn" id="encryptBtn">encrypt</button> <button class="decrypt-btn" id="decryptBtn">decrypt</button> </div> <div id="encryptResult" class="result-section"> <h3>result:</h3> <div class="result-content" id="encryptedOutput"></div> </div> <div id="decryptResult" class="result-section"> <h3>result:</h3> <div class="result-content" id="decryptedOutput"></div> </div> </div> </div> <script> // encrypt function encrypt(plainText) { const mt = "bW8Jc63Uz7I1N5R9"; const ht = "0000000000000000"; const key = CryptoJS.enc.Utf8.parse(mt); const iv = CryptoJS.enc.Utf8.parse(ht); const encrypted = CryptoJS.AES.encrypt(plainText, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); const hexString = encrypted.ciphertext.toString(); const wordArray = CryptoJS.enc.Hex.parse(hexString); return CryptoJS.enc.Base64.stringify(wordArray); } // decrypt function decrypt(cipherText) { const mt = "bW8Jc63Uz7I1N5R9"; const ht = "0000000000000000"; const key = CryptoJS.enc.Utf8.parse(mt); const iv = CryptoJS.enc.Utf8.parse(ht); const parsedBase64 = CryptoJS.enc.Base64.parse(cipherText); //return parsedBase64; const hexString = CryptoJS.enc.Hex.stringify(parsedBase64); //return hexString; const decrypted = CryptoJS.AES.decrypt( { ciphertext: CryptoJS.enc.Hex.parse(hexString) }, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 } ); return decrypted.toString(CryptoJS.enc.Utf8); } // 事件监听 encryptBtn.addEventListener('click', () => { const text = inputText.value.trim(); if (!text) { alert('please insert text first'); return; } try { const encrypted = encrypt(text); encryptedOutput.textContent = encrypted; encryptResult.style.display = 'block'; decryptResult.style.display = 'none'; } catch (e) { alert('error: ' + e.message); } }); decryptBtn.addEventListener('click', () => { const text = inputText.value.trim(); if (!text) { alert('please insert text first'); return; } try { const decrypted = decrypt(text); decryptedOutput.textContent = decrypted; decryptResult.style.display = 'block'; encryptResult.style.display = 'none'; } catch (e) { alert('error: ' + e.message); } }); </script> </body> </html> I have tryed the code below, but it dose not work: Local $crypto_js = BinaryToString(InetRead('https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js')) ;1 encrypt Local $str = 'hello' Local $encrypt_code = 'var ciphertext = "'&$str&'"' & _ 'var mt = "bW8Jc63Uz7I1N5R9";' & _ 'var ht = "0000000000000000";' & _ 'var key = CryptoJS.enc.Utf8.parse(mt);' & _ 'var iv = CryptoJS.enc.Utf8.parse(ht);' & _ 'var encrypted = CryptoJS.AES.encrypt(plainText, key, {' & _ ' iv: iv,' & _ ' mode: CryptoJS.mode.CBC,' & _ ' padding: CryptoJS.pad.Pkcs7' & _ '});' & _ 'var hexString = encrypted.ciphertext.toString();' & _ 'var wordArray = CryptoJS.enc.Hex.parse(hexString);' ;return ; $nJS = ObjCreate("MSScriptControl.ScriptControl") $nJS.language = "JavaScript" $nJS.addcode($crypto_js&$encrypt_code) MsgBox(0,0,$nJS.eval('CryptoJS.enc.Base64.stringify(wordArray)') ) $nJS = Null ;2 decrypt Local $crypt_str = 'hgrGXJU0a5dpU8cXiBwrPw==' Local $decrypt_code ='var ciphertext = "'&$crypt_str&'"' & _ 'var mt = "bW8Jc63Uz7I1N5R9";' & _ 'var ht = "0000000000000000";' & _ 'var key = CryptoJS.enc.Utf8.parse(mt);' & _ 'var iv = CryptoJS.enc.Utf8.parse(ht);' & _ 'var parsedBase64 = CryptoJS.enc.Base64.parse(cipherText);' & _ 'var hexString = CryptoJS.enc.Hex.stringify(parsedBase64);' & _ 'var decrypted = CryptoJS.AES.decrypt(' & _ ' { ciphertext: CryptoJS.enc.Hex.parse(hexString) },' & _ ' key,' & _ ' { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }' & _ ');' $nJS = ObjCreate("MSScriptControl.ScriptControl") $nJS.language = "JavaScript" $nJS.addcode($crypto_js&$decrypt_code) MsgBox(0,0,$nJS.eval('decrypted.toString(CryptoJS.enc.Utf8);') ) $nJS = Null crypto-js.min.js