Leaderboard
Popular Content
Showing content with the highest reputation on 07/29/2021 in all areas
-
Explanation: The Unicode character set includes a (large) number of already accented letters, like à, î, Õ, ç, etc, which have each been assigned one Unicode codepoint. Some languages use accented letters that aren't in the character set: to form these letters, the base letter is followed by one or more accent or modifiying letter. When such a string is displayed, the font renderer parses the codepoints including all diacritics and draws the whole thing as one letter. Unicode strings can adopt one of the several Normalization Form (see https://unicode.org/reports/tr15/ for gory details). In short, characters like letters can de decorated with a number of diacritics or modifying letters, like accents or strokes. An "all-in-one" character like Ñ can be represented in a string by either the single codepoint 0x00D1 in normalization form C or by the sequence 0x004E 0x0303 in form D, respectively E and the tilde accent. The idea of the above script is to transform the input string in normalization form D (decomposed characters) then use a regular expression to remove diacritics. You're then left with base letters only. Run this to see the decomposed form of the vietnamese string in question: Local $s = 'Nếu tôi là cậu thì sẽ biết mệt mỏi' Local $a = StringToASCIIArray(_UNF_Change($s, $UNF_NormD)) For $i = 0 To UBound($a) - 1 $a[$i] = StringFormat("0x%04X", $a[$i]) Next _ArrayDisplay($a) There diacritics are codepoints in the range 0x0300..0x036F. You can display fancy letters by appending diacritics to a letter, even if that combination is not used on Earth: this is a small latin letter "o" with "combining candrabindu", a "combining long solidus overlay" and a "combined ring below". I bet this glyph isn't in use. I formed it with "o" & ChrW(0x310) & ChrW(0x325) & ChrW(0x338). How it looks depend on deep details of the font renderer. The thing below can be selected only as one unit despite being an uninterruptible sequence of 4 Unicode codepoints. o̸̥̐ Hope this sheds some light on what's under the hood.3 points
-
Hmm, the code does not work here, because of the missing include. (client_list.au3) I saw your question in the other thread ... this is how you can get lines from a textfield (one by one): #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 396, 437, 192, 124) $Edit1 = GUICtrlCreateEdit("", 12, 11, 291, 400) GUICtrlSetData(-1, "Edit1") $Button1 = GUICtrlCreateButton("Button1", 319, 18, 57, 28) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $tmp=_GUICtrlEdit_GetLineCount($Edit1) CW("***********") For $x=0 to $tmp-1 $line=_GUICtrlEdit_GetLine($Edit1,$x) Cw($line) Next EndSwitch WEnd Func CW($txt) ConsoleWrite ($txt & @CRLF) EndFunc2 points
-
I was looking for a way to embed Windows Media Player into Autoit. I found 2 Windows Media Player UDF's but both of them seem to have used the OCX directly. The problem with using the OCX directly is that the video display size cannot be changed, and it takes the size of the video inherently. @seangriffin created the VLC GUI based on embedding the IE object into the GUI and that seems to work perfectly with Windows Media Player as well and it does not give the resize problem. I built the WMP.au3 around this concept and would like to share it with everybody. Attached is the WMP.au3 and the WMP_Example.au3 where it is used. Feedback is appreciated. This is my first UDF, so please be kind. SudeepJD WMP_Example.au3 WMP.au31 point
-
IniWrite isn't working
Musashi reacted to WhaleJesus for a topic
Don't worry i don't like drama, thanks for the explanation! Probably obvious enough that i should've figured it out myself but i'm sleep deprived half of the time1 point -
IniWrite isn't working
Musashi reacted to JockoDundee for a topic
@WhaleJesus, congratulations on being credited with your third solution in just as many discussions!1 point -
Note I updated my example with my hacked version of ___FileListToArrayRec() In this I added If $sName = ".." Then ContinueLoop EndIf If $sName = "." Then ContinueLoop EndIf To the native code block and the function works. Also added a simple _Log function so that the code runs. Complete example: #include <File.au3> Opt("TrayIconDebug", 1) $files = ___FileListToArrayRec("P:\test\sync", "*", $FLTAR_FILES, $FLTAR_RECUR) _ArrayDisplay($files) MsgBox(48, "Done", "Done") Func _Log($message) ConsoleWrite($message & @CRLF) EndFunc Func ___FileListToArrayRec($sFilePath, $sMask = "*", $iReturn = $FLTAR_FILESFOLDERS, $iRecur = $FLTAR_NORECUR, $iSort = $FLTAR_NOSORT, $iReturnPath = $FLTAR_RELPATH) If Not FileExists($sFilePath) Then Return SetError(1, 1, "") ; Check for Default keyword If $sMask = Default Then $sMask = "*" If $iReturn = Default Then $iReturn = $FLTAR_FILESFOLDERS If $iRecur = Default Then $iRecur = $FLTAR_NORECUR If $iSort = Default Then $iSort = $FLTAR_NOSORT If $iReturnPath = Default Then $iReturnPath = $FLTAR_RELPATH ; Check for valid recur value If $iRecur > 1 Or Not IsInt($iRecur) Then Return SetError(1, 6, "") Local $bLongPath = False ; Check for valid path If StringLeft($sFilePath, 4) == "\\?\" Then $bLongPath = True EndIf Local $sFolderSlash = "" ; Check if folders should have trailing \ and ensure that initial path does have one If StringRight($sFilePath, 1) = "\" Then $sFolderSlash = "\" Else $sFilePath = $sFilePath & "\" EndIf Local $asFolderSearchList[100] = [1] ; Add path to folder search list $asFolderSearchList[1] = $sFilePath Local $iHide_HS = 0, _ $sHide_HS = "" ; Check for H or S omitted If BitAND($iReturn, 4) Then $iHide_HS += 2 $sHide_HS &= "H" $iReturn -= 4 EndIf If BitAND($iReturn, 8) Then $iHide_HS += 4 $sHide_HS &= "S" $iReturn -= 8 EndIf Local $iHide_Link = 0 ; Check for link/junction omitted If BitAND($iReturn, 16) Then $iHide_Link = 0x400 $iReturn -= 16 EndIf Local $iMaxLevel = 0 ; If required, determine \ count for max recursive level setting If $iRecur < 0 Then StringReplace($sFilePath, "\", "", 0, $STR_NOCASESENSEBASIC) $iMaxLevel = @extended - $iRecur EndIf Local $sExclude_List = "", $sExclude_List_Folder = "", $sInclude_List = "*" ; Check mask parameter Local $aMaskSplit = StringSplit($sMask, "|") ; Check for multiple sections and set values Switch $aMaskSplit[0] Case 3 $sExclude_List_Folder = $aMaskSplit[3] ContinueCase Case 2 $sExclude_List = $aMaskSplit[2] ContinueCase Case 1 $sInclude_List = $aMaskSplit[1] EndSwitch Local $sInclude_File_Mask = ".+" ; Create Include mask for files If $sInclude_List <> "*" Then If Not __FLTAR_ListToMask($sInclude_File_Mask, $sInclude_List) Then Return SetError(1, 2, "") EndIf Local $sInclude_Folder_Mask = ".+" ; Set Include mask for folders Switch $iReturn Case 0 ; Folders affected by mask if not recursive Switch $iRecur Case 0 ; Folders match mask for compatibility $sInclude_Folder_Mask = $sInclude_File_Mask EndSwitch Case 2 ; Folders affected by mask $sInclude_Folder_Mask = $sInclude_File_Mask EndSwitch Local $sExclude_File_Mask = ":" ; Create Exclude List mask for files If $sExclude_List <> "" Then If Not __FLTAR_ListToMask($sExclude_File_Mask, $sExclude_List) Then Return SetError(1, 3, "") EndIf Local $sExclude_Folder_Mask = ":" ; Create Exclude mask for folders If $iRecur Then If $sExclude_List_Folder Then If Not __FLTAR_ListToMask($sExclude_Folder_Mask, $sExclude_List_Folder) Then Return SetError(1, 4, "") _Log("exclude list folder " & $sExclude_List_Folder) _Log("exclude list mask " & $sExclude_Folder_Mask) EndIf ; If folders only If $iReturn = 2 Then ; Folders affected by normal mask $sExclude_Folder_Mask = $sExclude_File_Mask EndIf Else ; Folders affected by normal mask $sExclude_Folder_Mask = $sExclude_File_Mask EndIf ; Verify other parameters If Not ($iReturn = 0 Or $iReturn = 1 Or $iReturn = 2) Then Return SetError(1, 5, "") If Not ($iSort = 0 Or $iSort = 1 Or $iSort = 2) Then Return SetError(1, 7, "") If Not ($iReturnPath = 0 Or $iReturnPath = 1 Or $iReturnPath = 2) Then Return SetError(1, 8, "") ; Prepare for DllCall if required If $iHide_Link Then Local $tFile_Data = DllStructCreate("struct;align 4;dword FileAttributes;uint64 CreationTime;uint64 LastAccessTime;uint64 LastWriteTime;" & _ "dword FileSizeHigh;dword FileSizeLow;dword Reserved0;dword Reserved1;wchar FileName[260];wchar AlternateFileName[14];endstruct") Local $hDLL = DllOpen('kernel32.dll'), $aDLL_Ret EndIf Local $asReturnList[100] = [0] Local $asFileMatchList = $asReturnList, $asRootFileMatchList = $asReturnList, $asFolderMatchList = $asReturnList Local $bFolder = False, _ $hSearch = 0, _ $sCurrentPath = "", $sName = "", $sRetPath = "" Local $iAttribs = 0, _ $sAttribs = '' Local $asFolderFileSectionList[100][2] = [[0, 0]] ; Search within listed folders While $asFolderSearchList[0] > 0 _Log("While no folders") Sleep(100) ; Set path to search $sCurrentPath = $asFolderSearchList[$asFolderSearchList[0]] ; Reduce folder search list count $asFolderSearchList[0] -= 1 ; Determine return path to add to file/folder name Switch $iReturnPath ; Case 0 ; Name only ; Leave as "" Case 1 ;Relative to initial path $sRetPath = StringReplace($sCurrentPath, $sFilePath, "") Case 2 ; Full path If $bLongPath Then $sRetPath = StringTrimLeft($sCurrentPath, 4) Else $sRetPath = $sCurrentPath EndIf EndSwitch ; Get search handle - use code matched to required listing If $iHide_Link Then ; Use DLL code $aDLL_Ret = DllCall($hDLL, 'handle', 'FindFirstFileW', 'wstr', $sCurrentPath & "*", 'struct*', $tFile_Data) If @error Or Not $aDLL_Ret[0] Then ContinueLoop EndIf $hSearch = $aDLL_Ret[0] Else ; Use native code $hSearch = FileFindFirstFile($sCurrentPath & "*") ; If folder empty move to next in list If $hSearch = -1 Then ContinueLoop EndIf EndIf ; If sorting files and folders with paths then store folder name and position of associated files in list If $iReturn = 0 And $iSort And $iReturnPath Then __FLTAR_AddToList($asFolderFileSectionList, $sRetPath, $asFileMatchList[0] + 1) EndIf $sAttribs = '' ; Search folder - use code matched to required listing While 1 _Log("While 1 start") Sleep(100) ; Use DLL code If $iHide_Link Then _Log("DLL call") Sleep(100) ; Use DLL code $aDLL_Ret = DllCall($hDLL, 'int', 'FindNextFileW', 'handle', $hSearch, 'struct*', $tFile_Data) ; Check for end of folder If @error Or Not $aDLL_Ret[0] Then ExitLoop EndIf ; Extract data $sName = DllStructGetData($tFile_Data, "FileName") ; Check for .. return - only returned by the DllCall If $sName = ".." Then ContinueLoop EndIf $iAttribs = DllStructGetData($tFile_Data, "FileAttributes") ; Check for hidden/system attributes and skip if found If $iHide_HS And BitAND($iAttribs, $iHide_HS) Then ContinueLoop EndIf ; Check for link attribute and skip if found If BitAND($iAttribs, $iHide_Link) Then ContinueLoop EndIf ; Set subfolder flag $bFolder = False If BitAND($iAttribs, 16) Then $bFolder = True EndIf Else _Log("No DLL call") Sleep(100) ; Reset folder flag $bFolder = False ; Use native code $sName = FileFindNextFile($hSearch, 1) ; Check for end of folder If @error Then _Log("error find next file") Sleep(100) ExitLoop EndIf ;- ADDED CODE ;- ADDED CODE ;- ADDED CODE If $sName = ".." Then ContinueLoop EndIf If $sName = "." Then ContinueLoop EndIf ;- ADDED CODE ;- ADDED CODE ;- ADDED CODE $sAttribs = @extended ; Check for folder If StringInStr($sAttribs, "D") Then _Log("folder " & $sName) Sleep(100) $bFolder = True EndIf ; Check for Hidden/System If StringRegExp($sAttribs, "[" & $sHide_HS & "]") Then _Log("hidden/system") Sleep(100) ContinueLoop EndIf EndIf ; If folder then check whether to add to search list If $bFolder Then Select Case $iRecur < 0 ; Check recur depth _Log("recur < 0") StringReplace($sCurrentPath, "\", "", 0, $STR_NOCASESENSEBASIC) If @extended < $iMaxLevel Then _Log("max level ") ContinueCase ; Check if matched to masks EndIf Case $iRecur = 1 ; Full recur _Log("recur = 1") If Not StringRegExp($sName, $sExclude_Folder_Mask) Then ; Add folder unless excluded _Log("aded folder " & $sName & " to list ") __FLTAR_AddToList($asFolderSearchList, $sCurrentPath & $sName & "\") EndIf ; Case $iRecur = 0 ; Never add ; Do nothing EndSelect EndIf If $iSort Then ; Save in relevant folders for later sorting If $bFolder Then If StringRegExp($sName, $sInclude_Folder_Mask) And Not StringRegExp($sName, $sExclude_Folder_Mask) Then __FLTAR_AddToList($asFolderMatchList, $sRetPath & $sName & $sFolderSlash) EndIf Else If StringRegExp($sName, $sInclude_File_Mask) And Not StringRegExp($sName, $sExclude_File_Mask) Then ; Select required list for files If $sCurrentPath = $sFilePath Then __FLTAR_AddToList($asRootFileMatchList, $sRetPath & $sName) Else __FLTAR_AddToList($asFileMatchList, $sRetPath & $sName) EndIf EndIf EndIf Else ; Save directly in return list If $bFolder Then If $iReturn <> 1 And StringRegExp($sName, $sInclude_Folder_Mask) And Not StringRegExp($sName, $sExclude_Folder_Mask) Then __FLTAR_AddToList($asReturnList, $sRetPath & $sName & $sFolderSlash) EndIf Else _Log("Checking file add to list") If $iReturn <> 2 And StringRegExp($sName, $sInclude_File_Mask) And Not StringRegExp($sName, $sExclude_File_Mask) Then _Log("added file " & $sName & " to list ") __FLTAR_AddToList($asReturnList, $sRetPath & $sName) EndIf EndIf EndIf WEnd ; Close current search If $iHide_Link Then DllCall($hDLL, 'int', 'FindClose', 'ptr', $hSearch) Else FileClose($hSearch) EndIf WEnd ; Close the DLL if needed If $iHide_Link Then DllClose($hDLL) EndIf ; Sort results if required If $iSort Then Switch $iReturn Case 2 ; Folders only ; Check if any folders found If $asFolderMatchList[0] = 0 Then Return SetError(1, 9, "") ; Correctly size folder match list ReDim $asFolderMatchList[$asFolderMatchList[0] + 1] ; Copy size folder match array $asReturnList = $asFolderMatchList ; Simple sort list __ArrayDualPivotSort($asReturnList, 1, $asReturnList[0]) Case 1 ; Files only ; Check if any files found If $asRootFileMatchList[0] = 0 And $asFileMatchList[0] = 0 Then Return SetError(1, 9, "") If $iReturnPath = 0 Then ; names only so simple sort suffices ; Combine file match lists __FLTAR_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList) ; Simple sort combined file list __ArrayDualPivotSort($asReturnList, 1, $asReturnList[0]) Else ; Combine sorted file match lists __FLTAR_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList, 1) EndIf Case 0 ; Both files and folders ; Check if any root files or folders found If $asRootFileMatchList[0] = 0 And $asFolderMatchList[0] = 0 Then Return SetError(1, 9, "") If $iReturnPath = 0 Then ; names only so simple sort suffices ; Combine file match lists __FLTAR_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList) ; Set correct count for folder add $asReturnList[0] += $asFolderMatchList[0] ; Resize and add file match array ReDim $asFolderMatchList[$asFolderMatchList[0] + 1] _ArrayConcatenate($asReturnList, $asFolderMatchList, 1) ; Simple sort final list __ArrayDualPivotSort($asReturnList, 1, $asReturnList[0]) Else ; Size return list Local $asReturnList[$asFileMatchList[0] + $asRootFileMatchList[0] + $asFolderMatchList[0] + 1] $asReturnList[0] = $asFileMatchList[0] + $asRootFileMatchList[0] + $asFolderMatchList[0] ; Sort root file list __ArrayDualPivotSort($asRootFileMatchList, 1, $asRootFileMatchList[0]) ; Add the sorted root files at the top For $i = 1 To $asRootFileMatchList[0] $asReturnList[$i] = $asRootFileMatchList[$i] Next ; Set next insertion index Local $iNextInsertionIndex = $asRootFileMatchList[0] + 1 ; Sort folder list __ArrayDualPivotSort($asFolderMatchList, 1, $asFolderMatchList[0]) Local $sFolderToFind = "" ; Work through folder list For $i = 1 To $asFolderMatchList[0] ; Add folder to return list $asReturnList[$iNextInsertionIndex] = $asFolderMatchList[$i] $iNextInsertionIndex += 1 ; Format folder name for search If $sFolderSlash Then $sFolderToFind = $asFolderMatchList[$i] Else $sFolderToFind = $asFolderMatchList[$i] & "\" EndIf Local $iFileSectionEndIndex = 0, $iFileSectionStartIndex = 0 ; Find folder in FolderFileSectionList For $j = 1 To $asFolderFileSectionList[0][0] ; If found then deal with files If $sFolderToFind = $asFolderFileSectionList[$j][0] Then ; Set file list indexes $iFileSectionStartIndex = $asFolderFileSectionList[$j][1] If $j = $asFolderFileSectionList[0][0] Then $iFileSectionEndIndex = $asFileMatchList[0] Else $iFileSectionEndIndex = $asFolderFileSectionList[$j + 1][1] - 1 EndIf ; Sort files if required If $iSort = 1 Then __ArrayDualPivotSort($asFileMatchList, $iFileSectionStartIndex, $iFileSectionEndIndex) EndIf ; Add files to return list For $k = $iFileSectionStartIndex To $iFileSectionEndIndex $asReturnList[$iNextInsertionIndex] = $asFileMatchList[$k] $iNextInsertionIndex += 1 Next ExitLoop EndIf Next Next EndIf EndSwitch Else ; No sort ; Check if any file/folders have been added If $asReturnList[0] = 0 Then Return SetError(1, 9, "") ; Remove any unused return list elements from last ReDim ReDim $asReturnList[$asReturnList[0] + 1] EndIf Return $asReturnList EndFunc ;==>_FileListToArrayRec1 point
-
IniWrite isn't working
WhaleJesus reacted to Jos for a topic
@workdir can change but @ScriptDir will not change so just use that as your current code isn't saving it properly.1 point -
IniWrite isn't working
WhaleJesus reacted to Danp2 for a topic
@WhaleJesusThat would definitely explain why IniWrite "isn't working". 😄1 point -
IniWrite isn't working
WhaleJesus reacted to Musashi for a topic
Some operations change the WorkingDir, but the macro @ScriptDir remains as it is.1 point -
Loc, That sounds as if an internal array is exactly what you need. You say that it "is working directly on the GUI" - does that mean that you click on the label to change the colour? If so then all you need to do is to check the current state and advance it to the next one. I have to take my grandchildren to "cantajuegos" (songs and dances for small children) in a few minutes, but I will try and produce something to show you how I think you might proceed later this evening. M231 point
-
In the code snippet here near bottom of your code: Local $pText1, $oText1 $oWindow1.FindFirst( $TreeScope_Descendants, $pCondition2, $pText1 ) $oText1 = ObjCreateInterface( $pText1, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oText1 ) Then Return ConsoleWrite( "$oText1 ERR" & @CRLF ) ConsoleWrite( "$oText1 OK" & @CRLF ) I just think you should replace $oWindow1 with $oStatusBar1 this way: Local $pText1, $oText1 $oStatusBar1.FindFirst( $TreeScope_Descendants, $pCondition2, $pText1 ) $oText1 = ObjCreateInterface( $pText1, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oText1 ) Then Return ConsoleWrite( "$oText1 ERR" & @CRLF ) ConsoleWrite( "$oText1 OK" & @CRLF )1 point
-
You could use a logging UDF like Loga. It allows two ways: it print its debug messages into the console, but at the same time into a logfile. Which you could open and watch on your 2nd monitor, preferrably using a tool which constantly displays new lines of the file. I think LogExpert should do the job (untested) it allows to have its own outpout windows, see example 09 of the udf.1 point
-
Security questions for AutoIT approval
TheDcoder reacted to argumentum for a topic
There. The OP did not login yet. Vote for me, "argumentum for moderator 2021". I'd close these type of thread because I'm mean and ... meh. PS: I would not like to be a moderator. I'd kill'em all. PS2: A big thank you to the moderation team. I would live with heartburn doing your job.1 point -
To the contrary. Decomposing composed characters is a complex but formal process obeying strict rules.The reverse process: transforming form D to form C is symetric so you can round trip from form C to form D to form C verbatim. Whatever combination of diacritics you add to "A", the base letter still remains "A". "À" (a precomposed Unicode character) decomposes to "A" followed by "`" (grave accent). Hence there is nothing arbitrary there. Other normalization forms (those with a K) operate on compatibility [de]composition while those without K are based on canonical (strict) equivalence. Compatibility means that things are not always reversible in all cases. For instance the fraction character ¼ is compatibity-decomposed into the ASCII 1/4.1 point
-
The script ends immediately right after the start ( before you can press F2). You will need e.g. a main loop. HotKeySet("{ESC}", "_Terminate") HotKeySet("{F2}", "GG") Local $wait = 1000, $left = 0, $right = 0 ; -------------- Main-Loop ----------------- While 1 Sleep(100) WEnd ; ------------------------------------------- Func GG() While 1 Progress($left, $right) Send("{LEFT}") Sleep($wait) $left = $left + 1 Progress($left, $right) Send("{RIGHT}") Sleep($wait) $right = $right + 1 Progress($left, $right) WEnd EndFunc ;==>GG Func Progress($left, $right) Local $hotkey = "" If @HotKeyPressed = "{F2}" Then $hotkey = "You Are gooood" EndIf ToolTip("Hotkey: " & $hotkey & " " & @HotKeyPressed & @CRLF & _ "Left: " & $left & @CRLF & _ "right: " & $right & @CRLF & _ "Time: " & time($left, $right), _ 400, 500, "_____Thanks so much!_____") EndFunc ;==>Progress Func time($left, $right) $totalSecs = (($left - $right) * $wait) / 1000 $hrs = Floor($totalSecs / 3600) $mins = Floor((($totalSecs / 3600) - $hrs) * 60) $secs = Floor((($totalSecs / 60) - Floor(($totalSecs / 60))) * 60) Return $hrs & " HR: " & $mins & "MIN: " & $secs & " S" EndFunc ;==>time Func _Terminate() ConsoleWrite("! Script terminated by user" & @CRLF) Exit; EndFunc ;==>_Terminate1 point
-
Use this to unaccent your strings: ; Unicode Normalization Forms Global Enum $UNF_NormC = 1, $UNF_NormD, $UNF_NormKC = 5, $UNF_NormKD Func _UNF_Change($sIn, $iForm) If $iForm = $UNF_NormC Or $iForm = $UNF_NormD Or $iForm = $UNF_NormKC Or $iForm = $UNF_NormKD Then Local $aRet = DllCall("Normaliz.dll", "int", "NormalizeString", "int", $iForm, "wstr", $sIn, "int", -1, "ptr", 0, "int", 0) Local $tOut = DllStructCreate("wchar[" & 2 * ($aRet[0] + 20) & "]") $aRet = DllCall("Normaliz.dll", "int", "NormalizeString", "int", $iForm, "wstr", $sIn, "int", -1, "ptr", DllStructGetPtr($tOut, 1), "int", 2 * ($aRet[0] + 20)) Return DllStructGetData($tOut, 1) Else SetError(1, 0, $sIn) EndIf EndFunc ;==>_UNF_Change Func _Unaccent($s, $iMode = 0) Local Static $aPat = [ _ "(*UCP)[\x{300}-\x{36F}`'¨^¸¯]", _ ; $iMode = 0 : remove combining accents only "(*UCP)\p{Mn}|\p{Lm}|\p{Sk}" _ ; $iMode = 1 : " " " and modifying letters ] Return StringRegExpReplace(_UNF_Change($s, $UNF_NormD), $aPat[Mod($iMode, 2)], "") EndFunc ;==>_Unaccent Local $s = 'Nếu tôi là cậu thì sẽ biết mệt mỏi' Local $t = _Unaccent($s) MsgBox(0, "", $s & @LF & $t) This has nothing to do with UTF8, let alone unsigned UTF8 (which doesn't make sense).1 point
-
You use StderrRead. Try to use StdoutRead.1 point
-
SimpleSnippetManager needs only the ini in the exe's folder. The location of the needed folders are defined there. This is the example of my SimpleSnippetManager.ini: [language] 00=BlitzBasic 01=D:\BB3D\IDEal\Snippets\ 02=bb 10=AutoIt 11=D:\!myapps\Snippet\Snippets\ 12=au3 20=Sdlbas 21=D:\!myapps\Snippet\Snippets\ 22=Sdlbas 30=JavaScript 31=D:\!myapps\Snippet\Snippets\ 32=js This is how i added (just now) the manager to the SciteUser.properties, and it looks like it is running just fine # 39 Simple Snippet Manager command.name.39.*=SimpleSnippetManager command.39.*="D:\!myapps\Snippet\SimpleSnippetManagerX64.exe" command.save.before.39.*=2 command.subsystem.39.*=2 (the .* allows the tool to be shown in any window, and not only for autoIt files)1 point
-
Can you fix the HotKeySet and @HotKeyPressed
Dana reacted to JockoDundee for a topic
Imagining what V. would say to that1 point -
How to run multiple PowerShell Cmdlet in the same instance under AutoIt?
Chuckero reacted to JockoDundee for a topic
You don't have to. Just add directive #AutoIt3Wrapper_Change2CUI=y Or, since I see no references to the Scite editor, you can just add the directive: #pragma compile(Console, True) to the top of your program.1 point -
You don't have to. Just add directive #AutoIt3Wrapper_Change2CUI=y Compile your script, run from DOS console, there you go...1 point