Jump to content

All Activity

This stream auto-updates

  1. Yesterday
  2. 1.8.5 released! This contains fix for the issue caused by UDF documentation headers with an empty newline in their content, found by @seadoggie01 I also found and fixed a related issue, where the capture regex did not capture the text after the empty newline for the tool-tip content.
  3. I found an issue with Tidy.exe (some time ago) and finally today I had time to diagnose this issue. Using the main.au3 ; the following include will be not properly processed by Tidy.exe as it has comment at the end of the line #include "Include\incl1.au3" ; added:11/12/23 23:06:37 ; the following include will be properly processed by Tidy.exe as there is no comment at the end of the line #include "Include\incl1.au3" I get: Would you @Jos be so kind and take a look on this issue ? All files attached in zip TIDY_issue_with_comment_after_include.zip
  4. The first post has been updated with version 0.9.6. This was a monster of an update. I had to rewrite the majority of how everything worked, new functions, etc. to allow for individual per-app and per-class custom rules. I spent a few days testing it and had to iron out a few bugs, particularly with special handling of apps likes Terminal, VSCode, etc. Now we can have different colored borders for different apps, different titlebar colors, blur behind on some apps and mica extended to client area on other apps. It's kind of like of buffet now. Needless to say, I am sure a few more bugs will pop up because almost everything changed. Please start with the new config file as well because a lot was changed and/or removed. There is also another example config file included which shows some examples and ideas.
  5. Last week
  6. I don't know which words to use because the translator changes them. I'm using the wm_command command to type two edits at the same time, but when I click on $Edit1, it automatically sends the text to $Edit2. And I would like it to send the text only after I edit something. I think the EN_CHANGE command does this, but I didn't know how to use it in AutoIT. The way iao747 sent it worked partially. If there is already some text in $Edit1, it automatically sends it to $Edit2. I hope I understood. Edit: with a little research I ended up getting it. If _WinAPI_HiWord($wParam) = $EN_CHANGE Then GUICtrlSetData($Edit2, GUICtrlRead($Edit1)) EndIf
  7. Of course, but it is not clear what you want to do. You must make you request clear enough otherwise we will just do away.
  8. Hi @seadoggie01! Thanks for the heads up! This is due to the incomplete parser. Currently With...EndWith blocks are not supported. Anything inside the block will fail, since i haven't added any rules to it yet. The reason is that EVERY rule needs to be copied with the small change, that ".property" is a valid syntax within that or child code blocks. It is low priority, since With...EndWith is rarely seen used, but will be supported in the future at some point (depending on how urgent it is). That's an interesting bug! From quick testing, the issue seems to be caused by the empty line in the remarks: ; Remarks .......: Use like: _Acro_DocBookmarkProperties($oBookmark) to get an array of values ; ; Default means values won't be changed. My guess is some of my code is stuck in an infinite loop... I will look into it and fix it soon, since it can deadlock the extension. "Legacy" documentation blocks was implemented quick, since I'm trying to move towards the more cross language familiar docBlock syntax, but that still does not mean the code should fail this spectacularly😅 >Developer: Reload Window Should be your solution. It's not great, but faster than restarting the entire application 😉 Thank you for the kind words and the bug reporting! 😄 Edit: found the line causing problems with the function documentation: https://github.com/genius257/vscode-autoit/blob/0f1bb89f8af77ee7a005d1d5a9da429e5f344700/server/src/autoit/docBlock/DocBlockFactory.ts#L84 It's my regular expression to test if the content matches the UDF documentation format. It causes catastrophic backtracking, never getting past that regex check. Prevention in JS seems to time a new worker, child-process or a regex library, from a quick google search... I don't want to do any of that currently, so I've updated the regex, so it no longer has issues with your example, and if my test parses, I will push the change, and hope this issue does not come back 😜
  9. I would like to know if there is a command that detects when I type an edit. Example: If "I typed in the Edit control", then
  10. Can anyone tell me how I can make the focus stay when I type and not when I click Edit?
  11. I think I have two bugs to report. I'm currently using VS Code 1.101.0 and v1.8.4 of your extension. The extension gives an error about the With syntax found in Excel.au3 in _Excel_BookNew. The error is: Syntax error: Expected "_", [\t ], or end of line but "I" found. The extension will silently stop displaying suggestions and won't load any function documentation if you reference a file that contains function documentation that is incorrectly formatted. In my case, I was referencing my Acro.au3 file which has a split Syntax line and an empty remarks line. It requires both to stop functioning, but I haven't been able to figure out exactly what the conditions are. It looks like this: I don't always follow the "proper" documentation (due to laziness about learning it), but I don't think the extension should crash because of it It'd be fantastic if it reported an error, great if it displayed just the information it understood, and perfectly acceptable if it displayed nothing and waited for me to update the documentation to something valid (hahahahaha!) Also, if anyone knows how to quickly restart extensions, I'd love to know. I spent a while testing by deleting some code, closing, and then reopening VS Code to find this bug. The "Extensions: Refresh" does nothing in the case of this not-quite-an-error. Disabling and enabling the extension via the menu is slow, but works -- as I found out later. As always, thank you so much for your work on this extension!
  12. Starting with Win11, for toast notifications to persist indefinitely, it requires the program to be registered AppX and I think that even requires digital signature. Even after all that, user can have notifications disabled which renders it pointless. This is why I ended up going with custom notifications for my apps.
  13. Your modified version works like a champ! No re-download of the AutoItObject UDF was necessary. Thanks!
  14. Local $hIcon = 0, $oNotif = 0, $bSuccess = False, $hTimer = TimerInit() ... ... If Not IsObj($oNotif) Then ConsoleWrite("Error: Failed to create COM object." & @CRLF) Return SetError(2, Int(TimerDiff($hTimer)), False) EndIf ... ... Return SetError(Int(Not $bSuccess), Int(TimerDiff($hTimer)), $bSuccess) ..so that when DoNotDisturb is ON, get a feedback of sorts ? ( due to the short time it took to return ) Now, if the Notification board/thingy is open it'll show forever but if is not then this: for a few seconds, but will not show in the above board, even if I leave the script running ( in a while loop ). Is that a user setting or something that can be coded ? Edit: ..remembered something about this and .. here is my answer ( untested by me yet ) https://www.autoitscript.com/forum/topic/211659-autoit-notifications-do-not-stay-in-windows-11-notification-centre/#findComment-1531865
  15. It is highly likely that you have an issue with the AutoItObject UDF. However, without tests, I cannot say more. You can redownload the UDF (not the compiled version) and try again.
  16. Hey, could you try this code and let me know if it works for you? Here's the optimized version. Thanks!" #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <WinAPIIcons.au3> #include <WinAPIShellEx.au3> ; Constants for SetBalloonInfo ;Global Const $NIIF_NONE = 0x00000000, $NIIF_USER = 0x00000004, $NIIF_NOSOUND = 0x00000010, $NIIF_RESPECT_QUIET_TIME = 0x00000080 ; Function to create and display the notification Func CreateSystemNotification($sTitle, $sMessage, $iTimeout = 2000, $iIconIndex = 13, $sSound = "") Local $hIcon = 0, $oNotif = 0, $bSuccess = False Local Const $sCLSID_IUserNotification = "{0010890E-8789-413C-ADBC-48F5B511B3AF}" Local Const $sIID_IUserNotification = "{BA9711BA-5893-4787-A7E1-41277151550B}" Local Const $tagIUserNotification = "SetBalloonInfo long(wstr;wstr;dword);" & _ "SetBalloonRetry long(dword;dword;uint);" & _ "SetIconInfo long(ptr;wstr);" & _ "Show long(ptr;dword);" & _ "PlaySound long(wstr);" ; Create COM instance $oNotif = ObjCreateInterface($sCLSID_IUserNotification, $sIID_IUserNotification, $tagIUserNotification) If Not IsObj($oNotif) Then ConsoleWrite("Error: Failed to create COM object." & @CRLF) Return False EndIf ; Load icon Local $dwFlags = $NIIF_USER If Not IsInt($iIconIndex) Or $iIconIndex < 0 Then $iIconIndex = 13 ; Default icon Else Local $iTotal = _WinAPI_ExtractIconEx(@SystemDir & '\shell32.dll', -1, 0, 0, 0) If $iIconIndex >= $iTotal Then $iIconIndex = 13 ; Fallback to default if index is out of range EndIf EndIf $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', $iIconIndex, 32, 32) If Not $hIcon Then ConsoleWrite("Error: Failed to load icon. Switching to NIIF_NONE." & @CRLF) $dwFlags = $NIIF_NONE EndIf ; Configure notification If $sSound Then $oNotif.PlaySound($sSound) $oNotif.SetBalloonInfo($sTitle, $sMessage, BitOR($NIIF_RESPECT_QUIET_TIME, $dwFlags)) $oNotif.SetBalloonRetry(0, 0, 0) $oNotif.SetIconInfo($hIcon, $sTitle) $oNotif.Show(0, $iTimeout) $bSuccess = True ; Mark success if we reach this point ; Cleanup If $hIcon Then _WinAPI_DestroyIcon($hIcon) $oNotif = 0 ; AutoIt handles COM cleanup automatically Return $bSuccess EndFunc ;==>CreateSystemNotification ; Example usage If CreateSystemNotification("Notification Title", "This is an AutoIt message", 2000) Then ConsoleWrite("Notification displayed successfully." & @CRLF) Else ConsoleWrite("Failed to display notification." & @CRLF) EndIf
  17. Hey guys. Sorry for the lapse in updates. Been pecking away little by little at some RPG stuff, slow progress but still progress. Situation with my daughter is nearing it's foreseeable end, she'll be home in a couple weeks and once she gets settled in and the final motions are filed things will ease up greatly and I'll be able to focus more on RPG stuff and programming stuff in general. I've been jotting things down and working on some little things lately as I've been very busy in life lately, but its been for a good cause and worth the effort! Do not worry, I've not stopped or forgotten about RPGenerator! Just been slow moving as I've had to move this project down my priority list more than I anticipated.
  18. Sorry folks, I didn't realize this was an old version of the code I use daily now.
  19. Here a working way to print colors in console with WriteConsole API. It seems the culprit is AllocConsole which does not provide the feature. I also added a way to ControlSend a command to the console. #include <WinAPIProc.au3> If Not @Compiled Then Exit MsgBox($MB_OK, "Error", "This script must be runned compiled") Local $iPID = Run(@ComSpec & " /k @echo off & echo " & Chr(27) & "[31mRed") ProcessWait($iPID) _WinAPI_AttachConsole($iPID) Local $hCon = _WinAPI_GetStdHandle(1) Local $sText = Chr(27) & "[33mYellow" & @CRLF _WinAPI_WriteConsole($hCon, $sText) Local $hWnd = WinGetHandle(@ComSpec) ControlSend($hWnd, "", "", "echo " & "^{^}[32mGreen" & @CRLF) ; <<<<<< depends on keyboard (could be ^[ for english KB) Sleep(2000) DllCall("kernel32.dll", "bool", "FreeConsole") ProcessClose($iPID) Note that you can start the exe from Explorer. ps. I must admit I spend way too many hours figuring what was the right ESC character to send
  20. funkey I couldn't adapt this command to my script. However, ioa747 helped me with this. Anyway, I appreciate your help. iao747 Thank you very much for your answer. It worked very well for me. I adapted it to use WM_COMMAND. I don't know if it's a problem, but I prefer it this way. Since I want to block special characters only when I type in the second edit, I chose to call StringRegExpReplace only for the second edit. This way, I can type "ä" in $Edit2 and "a" will appear in $Edit4. Example: Func _LimitCaracte($Caracte) $string = GUICtrlRead($Caracte) $string1 = StringRegExpReplace($string, "[ä]", "a") Return $string1 EndFunc
  21. Yes it is ! A variable containing a function...
  22. My fault: there was an extra $ there. CW is a function not a variable! $color = Chr(27) & '[31m' $CW($color & "some text" & @LF) Original post fixed. was correct!
  23. Good news! I've got the custom per-app / per-class functions working. So we can do custom rules with the full spectrum of options. The was the hard part. The last part that I have to do still is the easy part and that involves falling back to global coloring options (if set) for anything else that does not have custom rules or is not on the exclusion lists.
  24. different approach #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <WinAPIDlg.au3> _Main() Func _Main() Local $hGUI = GUICreate("Example", 250, 100) GUICtrlCreateLabel("Type name here (max 12 chars)", 20, 20) Local $idEditName = GUICtrlCreateEdit("", 20, 40, 160, 20, $ES_AUTOHSCROLL) GUICtrlSetLimit($idEditName, 12) Local $idEditResult = GUICtrlCreateEdit("", 20, 65, 160, 20, $ES_READONLY, 0) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch ; Check if the active control is $idEditName If _WinAPI_GetDlgCtrlID(ControlGetHandle($hGUI, "", ControlGetFocus($hGUI))) = $idEditName Then Local $sValue = _InputLimiter($idEditName) If $sValue <> "" Then GUICtrlSetData($idEditResult, $sValue) EndIf WEnd EndFunc Func _InputLimiter($iCtrlInput, $iMaxBaseLength = 12, $sSuffix = "-PC") Local Static $sLastValue Local $sCurrentValue = GUICtrlRead($iCtrlInput) If $sCurrentValue <> $sLastValue Then $sLastValue = $sCurrentValue Return StringLeft($sCurrentValue, $iMaxBaseLength) & $sSuffix EndIf Return "" EndFunc Edit: variant with more advanced limiter Func _InputLimiter($iCtrlInput, $iMaxBaseLength = 12, $sSuffix = "-PC") Local Static $sLastValue Local $sCurrentValue = GUICtrlRead($iCtrlInput) Local $sFilteredValue = StringRegExpReplace($sCurrentValue, "[^a-zA-Z0-9]", "") If $sFilteredValue <> $sCurrentValue Then GUICtrlSetData($iCtrlInput, $sFilteredValue) Return "" EndIf If $sFilteredValue <> $sLastValue Then $sLastValue = $sFilteredValue ; Update static ConsoleWrite("$sCurrentValue=" & $sCurrentValue & @CRLF) ; For debugging Return StringLeft($sFilteredValue, $iMaxBaseLength) & $sSuffix EndIf Return "" EndFunc
  1. Load more activity
×
×
  • Create New...