-
Posts
5,143 -
Joined
-
Last visited
-
Days Won
161
argumentum last won the day on September 28
argumentum had the most liked content!
About argumentum

- Currently Viewing Forums Index
Profile Information
-
Member Title
✨Universalist ✨
-
Location
I'm in your browser now =)
-
WWW
https://www.youtube.com/watch?v=SjwX-zMRxO0&t=5s
-
Interests
Relax
argumentum's Achievements
-
argumentum reacted to a post in a topic: StringReplace... mirrored ?
-
Local $sStr = "a ''' 123 ''' b ''' 234 ''' c'''345'''d" $out = StringRegExpReplace($sStr,"\'{3}\s(\d+)\s\'{3}","\*\' $1 \'\*") ; a *' 123 '* b *' 234 '* c'''345'''d ConsoleWrite(@CRLF & $out & @CRLF & @CRLF) ; a *' 123 '* b *' 234 '* c'''345'''d ...but wait, there is more ! ( in TV commercial advertisement they use the "..but wait, there is more.." ) For a string of an unknown number of these ''' pairs, @UEZ's regex works best Edit: we posted quite consecutively
-
argumentum reacted to a post in a topic: StringReplace... mirrored ?
-
argumentum reacted to a post in a topic: StringReplace... mirrored ?
-
quymao2 reacted to a post in a topic: StringReplace... mirrored ?
-
argumentum reacted to a post in a topic: AutoIt Extension for Visual Studio Code
-
donnyh13 reacted to a post in a topic: AutoIt Extension for Visual Studio Code
-
SOLVE-SMART reacted to a post in a topic: Is it possible to interact with the controls of a window if the window is hidden?
-
argumentum reacted to a post in a topic: StringReplace... mirrored ?
-
argumentum reacted to a post in a topic: StringReplace... mirrored ?
-
Exit test2() Func test2() ; my solution. ..thanks to @quymao2 for the enlightment =) Local $sStr = "a ''' 123 ''' b ''' 234 ''' c" While StringInStr($sStr, "'''") $sStr = StringReplace($sStr, "'''", "*'", 1) $sStr = StringReplace($sStr, "'''", "'*", 1) WEnd ConsoleWrite(@CRLF & $sStr & @CRLF & @CRLF) ; ' a *' 123 *' b ' EndFunc ; v2 Exit test() Func test() ;~ Local $sStr = "a ''' 123 ''' b" ; a *' 123 '* b ; good Local $sStr = "a ''' 123 ''' b ''' 234 ''' c" ; a *' 123 *' b '* 234 '* c ; =(.... ConsoleWrite(@CRLF & StringReplace(StringLeft($sStr, StringLen($sStr)/2+1), "'''", "*'") & StringReplace(StringRight($sStr, StringLen($sStr)/2), "'''", "'*") & @CRLF & @CRLF) ; ' a *' 123 *' b ' EndFunc yes, but if I want to do a longer string ... @quymao2 gave me "a north" ( as Cubans say ), hence this solution
-
Actually, I'd like to replace '' and not ''' but, I'd like the 2nd *' to be '* 😭
-
Ok. This is your "Program" #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- ; Running the below code works because passing @SW_SHOW to the show flag parameter will launch the application with a visible GUI ; Change "@SW_SHOW" to "@SW_HIDE", and the script no longer works. $enabled = False Run ( "C:\Program Files (x86)\Program\Program.exe", @SystemDir, @SW_SHOW ) WinWait ( "Program", "OK" ) WinActivate ( "Program", "OK" ) WinWaitActive ( "Program", "OK" ) If ControlCommand ( "Program", "OK", "[CLASS:Button; INSTANCE:3]", "IsChecked", "" ) = 0 Then $enabled = False ControlClick ( "Program", "OK", "[CLASS:Button; INSTANCE:3]" ) Else $enabled = True EndIf ControlClick ( "Program", "OK", "[CLASS:Button; INSTANCE:4]" ) #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;~ HotKeySet("{ESC}", "Terminate") #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Program", 400, 100, 100, 100) $Button1 = GUICtrlCreateButton("OK", 8, 8, 75, 25) $Checkbox1 = GUICtrlCreateCheckbox("HideMe", 100, 10, 95, 17) $Checkbox2 = GUICtrlCreateCheckbox("Bttn3", 200, 10, 95, 17) $Button2 = GUICtrlCreateButton("Close", 300, 8, 75, 25) $Edit1 = GUICtrlCreateEdit("OK" & @CRLF & "You can close this from the tray if you must", 8, 38, 400 - 16, 100 - 38 - 8) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ToolTip((GUICtrlRead($Checkbox2) = 1 ? "GUI_CHECKED" : "UNCHECKED"), 50, 50, "Program") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Button2 Terminate() Case $Checkbox2 ToolTip((GUICtrlRead($Checkbox2) = 1 ? "GUI_CHECKED" : "UNCHECKED"), 50, 50, "Program") Case $Checkbox1 WinSetState("Program", "OK", @SW_HIDE) EndSwitch WEnd Func Terminate() GUIDelete() Exit EndFunc ;==>Terminate and this is what is missing from your code Opt("WinDetectHiddenText", 1) And !, thanks for the help file review Edit: do add a timeout If Not WinWait ( "Program", "OK", 5 ) Then Exit 5 ; 5 secs should be enough I guess
-
Exit test() Func test() Local $sStr = "a ''' 123 ''' b" ConsoleWrite(@CRLF & StringReplace($sStr, "''", "*") & @CRLF & @CRLF) ; ' a *' 123 *' b ' EndFunc That returns: ' a *' 123 *' b ' but I need ' a *' 123 '* b '
-
AutoIt Extension for Visual Studio Code
argumentum replied to LoganCH's topic in AutoIt Projects and Collaboration
..and on related news: "Windows 7 usage is going up! Windows 11 usage went down!" (video) -
argumentum reacted to a post in a topic: AutoIt Extension for Visual Studio Code
-
Musashi reacted to a post in a topic: AutoIt Extension for Visual Studio Code
-
SOLVE-SMART reacted to a post in a topic: AutoIt Extension for Visual Studio Code
-
AutoIt Extension for Visual Studio Code
argumentum replied to LoganCH's topic in AutoIt Projects and Collaboration
I could install Win7 in a VM but am clueless to all VSCode. I don't use it. Would not know what works and what don't. If you don't have a Win7 ISO, go to torrent-land and get an up to date one. I'll retire the day I die. Maybe even after ! I loved WinXP but time moves forward. Win11 ain't bad ( after you tweak the heck out of it ). I install Windows on any language is not because am a polyglot, but because everything is always pretty much the same in the same place, same icons. Remember: Your feet don't stay on the ground because of gravity. The whole planet stick to your feet because of your gravitas 🙇 -
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
installing Japanese too because Greek was too easy 🤣 I think we call those two functions and recreate the user's string from that but as I am right now ( the headache ), I don't know if it makes sense to go that way 🤷♂️ Edit: Done | 0 - date and/or time. | 1 - long date, regional settings. | 2 - short date, regional settings. | 3 - time, regional settings. | 4 - time 24-hour (hh:mm). | 5 - time 24-hour (hh:mm:ss). | 6 - time AM/PM (hh:mm tt). | 7 - time AM/PM (hh:mm:ss tt). | 2025/09/28 11:40:29 | 2025年9月28日 | 2025/09/28 | 11:40:29 | 11:40 | 11:40:29 | 11:40 午前 | 11:40:29 午前 | 2025/12/31 11:59:59 | 2025年12月31日 | 2025/12/31 | 11:59:59 | 11:59 | 11:59:59 | 11:59 午前 | 11:59:59 午前 | 2025/12/31 23:59:59 | 2025年12月31日 | 2025/12/31 | 23:59:59 | 23:59 | 23:59:59 | 11:59 午後 | 11:59:59 午後 | 2025/12/31 11:59:59 | 2025年12月31日 | 2025/12/31 | 11:59:59 | 11:59 | 11:59:59 | 11:59 午前 | 11:59:59 午前 | 2025/12/31 23:59:59 | 2025年12月31日 | 2025/12/31 | 23:59:59 | 23:59 | 23:59:59 | 11:59 午後 | 11:59:59 午後 So I guess Japanese has a simple format, I guess. I installed it because MSDN say: "g, gg Period/era string formatted as specified by the CAL_SERASTRING value. The "g" and "gg" format pictures in a date string are ignored if there is no associated era or period string." and Japanese should have these ? "Year represented by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed." We could use one user from every country to make sure. ..or we'll add it in a next version. I don't know any of these languages and cultures and I'll guess wrong. So I'll stop installing more VMs. "Hindsight is 20/20" -
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
..I see that my headache still limiting me 😭 -
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
...not really. Say "dddd, d' de 'MMMM' de 'yyyy' a las 'hh:mm tt|am|pm" vs "dddd, d' de 'MMMM' de 'yyyy' a las 'HH:mm tt|am|pm" One is 12 hour and the other 24 hour as per M$: "In the format types, the letters "m", "s", and "t" must be lowercase, and the letter "h" must be lowercase to denote the 12-hour clock or uppercase ("H") to denote the 24-hour clock." So if we follow M$ notation, it can all be resolved with just the custom string, and send the users to read MSDN's date and time rules. $vType would be a number 0 to 7 and if a string ( "dddd, d' de 'MMMM' de 'yyyy' a las 'HH:mm tt|am|pm" ), then we chop that up and rebuild it from the values from the _WinAPI_Get*Format() functions. It makes sense in my head. But I'd have to code it to know that it is possible. Also, I'd have to see for myself the "Σεπτεμβρίου vs. Σεπτέμβριος". See if the OS returns the proper string for "Nominative Case vs. Genitive Case" ( of which am clueless ). -
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
"||AM|PM" or forcefully add the default ( AM|PM ). But the merging of date and time would attend to those that have a regional setting that does not please the user. In you case that coma before the year. Like a free style option 1 ... Case 1 $sTempString = _WinAPI_GetLocaleInfo($iLcid, $LOCALE_SLONGDATE) ; Get long date format. If Not @error And Not ($sTempString = '') Then $sTempDate = $sTempString ConsoleWrite('+ ' & $sTempDate & @CRLF) Else $sTempDate = "dddd, MMMM dd, yyyy" ConsoleWrite('! ' & $sTempDate & @CRLF) EndIf ... that would include ... $sTempString = _WinAPI_GetLocaleInfo($iLcid, $LOCALE_STIMEFORMAT) ; Get short time format. If Not @error And Not ($sTempString = '') Then $sTempTime = $sTempString Else $sTempTime = "h:mm:ss tt" EndIf ... that way the user can make any time/date possibility without having to call it twice. I'd explain it in code but I've got a headache - That's what she said -
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
"dddd d,|h:m tt|AM|PM" Just expand the string to include custom "ante meridiem" and "post meridiem" strings. So "dddd d,|h:m tt| in the morning| in the evening" could be had. Going the extra mile, not separate the date and time but have it mixed: "dddd, d' de 'MMMM' de 'yyyy' a las 'hh:mm tt|am|pm" and that would be more flexible to use for those that don't like anything from 0 to 7 -
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
..was looking at Hour, Minute, and Second Format Pictures - Win32 apps | Microsoft Learn and say: "t One-character time marker string. Note: This format is not recommended for use with certain languages, such as Japanese (Japan). With this format, an application always takes the first character from the time marker string, defined by LOCALE_S1159 (AM) and LOCALE_S2359 (PM). Because of this, the application can create incorrect formatting with the same string used for both AM and PM." So, adding a custom "AM/PM" would not be that much more code/work and would give the user the ability to use "a/p" if that's the user's fancy, or just makes sense in that culture. Will you add it ? -
so..., wassup !. Are you gonna share more ?
-
Hour AM/PM ( yes, one more of these )
argumentum replied to argumentum's topic in AutoIt Example Scripts
..back to the scheduled program... Do you wanna tweak the beta5 ? ( to force an AM/PM if not in the idiom's settings in your strings (h:m tt) ? ) In any case, all these options will be declared in the help file. If this is as far as we take it, the explanation will be in the help file. Would you like to add "yyyy.MM.dd|HH.mm.ss tt|AM/PM" ? "The ball is in your court"