Leaderboard
Popular Content
Showing content with the highest reputation on 04/04/2024 in all areas
-
GDI - Interactive Fader and Knob controls
argumentum and one other reacted to MattyD for a topic
Hi all, A couple of additions today. ctrl + click a fader or knob to reset it to a default value. shift + drag a fader or knob to make fine adjustments. Default values can be set per-control with: _GUICtrlGDI_SetDefaultValue($hWnd, $iValue) Otherwise out-of-the-box default values are: LR Knob/Horizontal Fader = 64 Vertical Fader = 100 All Else = 02 points -
Should be easy when all that needed to be done is copy a "THEME" template file into the file pointed to. Could even consider letting it run parallel with the current available themes and connect them by naming them the same.2 points
-
Yep, one of those moments where I forgot that \u or \l doesn't work with our PCRE engine 😞. So I *slap-sticked* some code together to achieve what I needed on the fly. This is truly ugly IMO, but if you're not doing a lot of string manipulation concatenations it's ok. I know I wrote some pcre funcs in a dll back in the day for my personal use to be able to do some things like this, but of course I can't find it... So native it is. Anyway, I added this to my personal chars au3, thus the name you'll see. Please test and criticize away, like I said, it was a quick mod and it's A-L-O-T of regex this and regex that ... but maybe it's useful for someone. #include <StringConstants.au3> #include <Array.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _AutChars_RegExpReplaceEx ; Description ...: Allows StringRegExpReplace replace with pattern to do upper/lower ; Syntax ........: _AutChars_RegExpReplaceEx($sData, $sRegEx, $sReplace[, $iCount = 0]) ; Parameters ....: $sData - The string to check ; $sRegEx - The regular expression to compare. See StringRegExp for pattern definition characters. ; $sReplace - The text to replace the regular expression matching text with ; $iCount - Number of replacements. Default is 0 for global replacement ; Return values .: Success - an updated string based on regular expressions ; @extended = number of replacements performed ; Author ........: SmOke_N (Ron Nielsen.. Ron.SMACKThatApp@GMail.com) ; Modified ......: ; Related .......: See StringRegExpReplace() ; Remarks .......: Will only work with \u or \l such as \u$2 in replace with pattern ; In my opinion, this is a pretty abusive way to achieve this, might be fine for small jobs ; but the overhead would be immense ; Example .......: _AutChars_RegExpReplaceEx("abcdAbcefg", "abc", "\u$0") will return ABCdAbcefg ; =============================================================================================================================== Func _AutChars_RegExpReplaceEx($sData, $sRegEx, $sReplace, $iCount = 0) ; work in progress Local Const $iGlobalMatch = $STR_REGEXPARRAYGLOBALMATCH Local $sRet = "" Local Const $sMatchRE = "[\\$](?:u|l)[\$\\]{?\d+\}?" If Not StringRegExp($sReplace, $sMatchRE) Then $sRet = StringRegExpReplace($sData, $sRegEx, $sReplace, $iCount) Return SetError(@error, @extended, $sRet) EndIf ; unique identifier Local $sUStart = "<" & Chr(1) & "@U@" & Chr(1) & ">" Local $sUEnd = "</" & Chr(1) & "@U@" & Chr(1) & ">" Local $sLStart = "<" & Chr(1) & "@L@" & Chr(1) & ">" Local $sLEnd = "</" & Chr(1) & "@L@" & Chr(1) & ">" ; modify replace string Local $sTmp = $sReplace $sTmp = StringRegExpReplace($sTmp, "(?i)([\\$]u)([\$\\]{?\d+\}?)", $sUStart & "$2" & $sUEnd) $sTmp = StringRegExpReplace($sTmp, "(?i)([\\$]l)([\$\\]{?\d+\}?)", $sLStart & "$2" & $sLEnd) Local $sRepStr = StringRegExpReplace($sData, $sRegEx, $sTmp, $iCount) Local $iExtended = @extended ; get upper and lower matches with unique identifier Local $aMatchUpper = StringRegExp($sRepStr, "(\Q" & $sUStart & "\E.*?\Q" & $sUEnd & "\E)", $iGlobalMatch) Local $aMatchLower = StringRegExp($sRepStr, "(\Q" & $sLStart & "\E.*?\Q" & $sLEnd & "\E)", $iGlobalMatch) ; no need to worry about case Local $aMUpUnique, $aMLrUnique If IsArray($aMatchUpper) Then $aMUpUnique = _ArrayUnique($aMatchUpper, 0, 0, 0, $ARRAYUNIQUE_NOCOUNT) EndIf If IsArray($aMatchLower) Then $aMLrUnique = _ArrayUnique($aMatchLower, 0, 0, 0, $ARRAYUNIQUE_NOCOUNT) EndIf $sRet = $sRepStr Local $sMatch For $i = 0 To UBound($aMUpUnique) - 1 $sMatch = StringRegExpReplace($aMUpUnique[$i], "\Q" & $sUStart & "\E|\Q" & $sUEnd & "\E", "") $sRet = StringReplace($sRet, $aMUpUnique[$i], StringUpper($sMatch), $iCount) Next For $i = 0 To UBound($aMLrUnique) - 1 $sMatch = StringRegExpReplace($aMLrUnique[$i], "\Q" & $sLStart & "\E|\Q" & $sLEnd & "\E", "") $sRet = StringReplace($sRet, $aMLrUnique[$i], StringLower($sMatch), $iCount) Next Return SetExtended($iExtended, $sRet) EndFunc1 point
-
AutoItHelp v3.3.16.1 with external CSS loading
argumentum reacted to donnyh13 for a topic
Sounds good, I'll try my hand at it as time permits, see if I can come up with anything. Did you look at the one by Taurus that was posted a while ago? A few notes on your current CSS: th { .... border-width:.1ex /* 1px; */ /* Forgot semicolon here ====================================================== */ .... h1 { ..... padding-bottom:.84ex /* 15px; */ /* Forgot semicolon ======================================================= */ ...... div.codeSnippetToolBarText { ...... /* text-decoration:underline; /* Ly */ */ /* DOUBLE end of comment here =======================================================*/ ...... .codeSnippetContainerCode pre { padding-left:.7ex /* Ly 5px; */ /* Missing semicolon here ============================================================= */ That's a great idea! Sounds like an interesting project. Will try to help as possible. If Jos doesn't take pity on us first. 🤣1 point -
OpenAI GPT 4.0 API (or 3.5) - base code
argumentum reacted to BasicOs for a topic
Thanks I put also a link here in other 3 related Gpts or openai. In case some of the (gpts) members want to chat about this Autoit Devin. I am more analyst then coder lately. More into shaping. Enjoy coding!!1 point -
As @MattyD said, you cannot blindly convert 193 into -63 without knowing the size base of the source (8/16/32 bits). You will have to follow (debug) the UDF till you find exactly where and how the data is received with/by the UDF (and it is quite possible that you will need to adapt the UDF). Since we only have a very small part of the code, it is very difficult for us to provide a proven solution.1 point
-
The function above does exactly this: ConsoleWrite(SInt(595) & @CRLF) ConsoleWrite(SInt(333) & @CRLF) ConsoleWrite(SInt(339) & @CRLF) ConsoleWrite(SInt(193) & @CRLF) ConsoleWrite(SInt(65136) & @CRLF) Func SInt($iValue) Local $iIntRange = ($iValue <= 0xFF ? 0xFF : ($iValue <= 0xFFFF ? 0xFFFF : 0xFFFFFFFF)) Local $iSignedRange = ($iValue <= 0xFF ? 0x80 : ($iValue <= 0xFFFF ? 0x8000 : 0x80000000)) Return BitAND($iValue, $iSignedRange) ? BitNOT(BitAND(BitNOT($iValue), $iIntRange)) : $iValue EndFunc Result:1 point
-
TaskPin
ioa747 reacted to kurtykurtyboy for a topic
Hey @ioa747 this is really cool and has a lot of potential. A couple suggestions: In your loop while checking to see if the mouse leaves the GUI, either give a buffer area around the window or put a 500ms delay. Maybe I am just clumsy (using trackpad), but I seem to "miss" my selection every time then the GUI closes itself and I have to try again very carefully. I would suggest in the click event function, first hide the GUI then do the action then exit. Hiding the GUI right away lets me know that I actually clicked it. I am loading folders from SharePoint over VPN, so it takes a few seconds to open the explorer window and I keep questioning whether or not I actually clicked it. Alternatively, you could show a loading cursor instead of hiding the GUI. If someone doesn't change the default text for "<Tip>" then just don't set a tooltip. This is for lazy people like me. In the editor, I've gotten used to changing the text then clicking the blank area to apply it. But this was not intuitive to me. I would prefer to see a "Save" button, so I know for sure that my changes applied. A few times I forgot to click away before closing the window and realized it didn't actually save my change.1 point -
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
...and, I'm gonna try to push the idea of having the web site help also light (default) and dark themed ( by way of this video or similar). ( link to my test ) Given my coloring inability, any web site dark coloring ideas are welcome. Just change the default.css and post it here. To do so, I guess you can use "Inspect element" and give it a try. But am sure there is better tooling than this but I don't know them. Am not a web developer at heart Edit: Well, is simpler than I thought. Just Ctrl + A ( to select all ) and Ctrl + C ( to copy to clipboard ), and there you have your edit, ready to paste1 point -
AutoItHelp v3.3.16.1 with external CSS loading
donnyh13 reacted to argumentum for a topic
Yes, it works !. Make the AutoIt.css in the help file folder, with just this one line: @import "file://C:/Users/<YourUsername>/AppData/Local/AutoIt v3/Au3HelpFile/MyColorful.css"; and place the real CSS you'd like to use where you just declared it in that one line. Now is a matter of modifying "SciTE Config for AutoIt3" in such compelling way that @Jos would say "yes, you are the man the coder, ma' main man coder !". Or a separate script. We'll have to brainstorm it. One baby step at the time.1 point -
SNMP_UDF for SNMPv1 and SNMPv2c
argumentum reacted to A-Team for a topic
of course it is!, it interprets the values with Two complement here I don't know the time I spent trying to troubleshoot this, I am learning data structures in college, but I learned more trying to figure this out..1 point -
#AutoIt3Wrapper_Change2CUI=y #include <string.au3> For $i = 1 to 79 $part1 = _StringRepeat(Chr(219), $i) $part2 = _StringRepeat(Chr(177), 79 - $i) ConsoleWrite(@CR & $part1 & $part2) Sleep(50) Next ; uncomment this if you want to preserve finished progressbar ;~ ConsoleWrite(@CRLF & "DONE!") ; comment this if you want to preserve finished progressbar ConsoleWrite(@CR & _StringRepeat(' ', 79)) ConsoleWrite(@CR & "DONE!")1 point