Leaderboard
Popular Content
Showing content with the highest reputation on 05/24/2023 in all areas
-
The issues that you are currently experiencing, such as mciSendString("play myMedia fullscreen"), are caused by the codecs you have installed on your system for playback. Klite is only useful if you also use their included player for all of your playback. If you want to use a Windows supplied player, you'll need to use a codec package specifically designed for Windows players. If you have used Klites GUI to select the 64bit WMP as default, have a look at the file wmsetup.log found inside the Windows temp folder. That file is loaded with errors caused by Klite. My software leaves that file clean and error free. I distribute a portable codec package (no installer) with a highly configurable GUI written in AutoIt that defaults to using LAV filters and the 64bit WMP but I also include very useful alternative codecs produced by the MPC-BE Dev Team (extremely active development) because their codecs do not cause any issues for WMP or for winmm.dll. Just search my username and get the ADVANCED package. Use Launcher64.exe to get it set up. It will auto-remove Klite for you if it is still installed. Next, use the AutoUpdate feature found on the Help TAB because I have several unpublished updates specifically for use with winmm.dll that will be installed by the update feature. After AutoUpdate completes and no further updates are available, go have a look on the Misc TAB and checkout the checkbox [x] Windows MCI player. That checkbox uses winmm.dl. Hover that checkbox for up to date info! Plenty of tooltips to help you learn the GUI and of particular interest, hover the WMP suggested settings checkbox for pertinent information. I rarely promote my own software in public forums but you needed my help.1 point
-
Problem with encryption, decryption and the Credential Manager
DonChunior reacted to TheXman for a topic
One of the simplest ways would be to store your encrypted data as text using a binary-to-text encoding scheme like Base64.1 point -
Problem with encryption, decryption and the Credential Manager
DonChunior reacted to Danyfirex for a topic
Hello, Maybe using https://stackoverflow.com/questions/9221245/how-do-i-store-and-retrieve-credentials-from-the-windows-vault-credential-manage Saludos1 point -
Problem with encryption, decryption and the Credential Manager
DonChunior reacted to Andreik for a topic
Well, when you store the encrypted string in Credential Manager you might end there with some characters that might not be accepted. Let's take for example the string WhatIsHereTheProblem. After you encrypt that string you have a binary like this one 0xD30B275190CF6055989600883E25CDC3D1BA0D9C. It's easy to spot that 11th character is null character (00). Convert that binary to string and you already send messy data to Credential Manager so don't expect anything good when you try to read and decrypt what Credential Manager saved. So it's not about length but about what you get after encryption. You can test that with a string even longer like "Very longggggggggggggggg" and you can see this one doesn't have any problem, but it's just a happy case.1 point -
Nobody has for the perfectly good reason that it doesn't make any sense to try to "use" a C header file (meant to hold various C declarations/definitions so that the C compiler knows about them) in an AutoIt interpreter. That's about the same as asking how to use the table of content of a surgery textbook in an Excell accounting spreadsheet.1 point
-
#RequireAdmin AutoItSetOption('WinTitleMatchMode', 2) $Question = 'No' $ProxyHost = 'MyHost' $ProxyPort = 'MyPort' $InstallDir = @ProgramFilesDir & '\Progress Software\WebClient' $ProgramFolder = 'PSC WebClient 11.7' $ClientAppInstallDir = @ProgramFilesDir & '\Progress Software\WebClientApps' $Path = '<Path to install dir>\setup.exe' Run($Path) WinWait('WebClient') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static5') = 'Welcome to the InstallShield Wizard for WebClient' ControlClick('WebClient', '', 'Button1') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static5') = 'License Agreement' ControlClick('WebClient', '', 'Button2') WinWait('Question') ControlClick('Question', '', ($Question = 'Yes' ? 'Button1' : 'Button2')) If $Question = 'Yes' Then Do Sleep(10) Until ControlGetText('WebClient', '', 'Static9') = 'Proxy Server' ControlSetText('WebClient', '', 'Edit1', $ProxyHost) ControlSetText('WebClient', '', 'Edit2', $ProxyPort) ControlClick('WebClient', '', 'Button2') EndIf Do Sleep(10) Until ControlGetText('WebClient', '', 'Static7') = 'Choose WebClient Destination Location' ControlSend('WebClient', '', 'Button5', 'r') WinWait('Choose Folder') ControlSetText('Choose Folder', '', 'Edit1', $InstallDir) ControlClick('Choose Folder', '', 'Button1') ControlClick('WebClient', '', 'Button1') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static8') = 'Select Program Folder' ControlSetText('WebClient', '', 'Edit1', $ProgramFolder) ControlClick('WebClient', '', 'Button2') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static7') = 'Untranslated Message Files' ControlClick('WebClient', '', 'Button1') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static1') = 'Please choose the desired language for messages' ControlClick('WebClient', '', 'Button4') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static7') = 'Choose WebClient Applications Destination Location' ControlSend('WebClient', '', 'Button5', 'r') WinWait('Choose Folder') ControlSetText('Choose Folder', '', 'Edit1', $ClientAppInstallDir) ControlClick('Choose Folder', '', 'Button1') ControlClick('WebClient', '', 'Button1') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static6') = 'Start Copying Files' ControlClick('WebClient', '', 'Button1') Do Sleep(10) Until ControlGetText('WebClient', '', 'Static4') = 'InstallShield Wizard Complete' ControlClick('WebClient', '', 'Button4') The only part that is not automated is where you have the option to choose more languages because there it's a custom component, but you should figured it out how to do it with ControlClick and some relative positions to the window.1 point
-
;~ Some controls will resist clicking unless they are the active window. ;~ Use the WinActivate() function to force the control's window to the top before using ControlClick(). Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase $hwin = WinWait('WebClient - InstallShield Wizard') ConsoleWrite("WinActivate=" & WinActivate($hwin) & @CRLF) ConsoleWrite("ControlClick=" & ControlClick($hwin, '', 'Button5') & @CRLF)1 point
-
What are you trying to install? I can give a try.1 point
-
JSON UDF in pure AutoIt
Rurorita reacted to AspirinJunkie for a topic
Oh thank you. I actually didn't see that. I started the github story to learn how to use github. So far I didn't have a pull request and thought I would get some notification in that case. But I have received nothing. Let's see if I can set something. Now to your changes: Basically you can drive several approaches. Either you design your code so that it is usable with as many use cases as possible or you optimize it for certain special cases. With the latter you buy speed compared to more code and possibly also clarity. So far I have used exactly this general approach with _JSON_Generate(). If you take a closer look, you could consider two more common special cases when using it here: On the one hand the case of the most compact JSON code possible (which funnily enough I simplified just yesterday with the _JSON_GenerateCompact()) and on the other hand a more common parameter choice for good human readability. The latter I have covered so far via the default parameters of _JSON_Generate(). Now, of course, you can write special functions for both and, unsurprisingly, achieve a performance boost for these cases. For one special case - the compact JSON code - you have now done this and in my measurements I get a performance increase of 20-25% compared to the general functions. That's not little and now you can already ask if the tradeoff of performance improvement vs. code complexity makes sense or not. I myself needed the performance so far with _JSON_Parse(). With _JSON_Generate() I never reached a limit where I needed more. But that can be different for other users. Therefore you can consider to add special functions for this, if there is a demand for it. However, I would not like to take over the adjustments from you directly, for the following reasons: _JSON_Generate() defaults to the nicely formatted _JSON code. With youre changes it becomes script-breaking because you now suddenly define the compact JSON code as the default case. Why not leave _JSON_Generate as the universal form and cast your case to a _JSON_GenerateCompact() instead? That way the backward compatibility would still exist. I don't really like the $_JSON_TYPES approach considering the result achieved with this. You need another function which is executed once (and which itself could be ~80% faster), another global constant and the readability decreases (slightly). Result with my measurements: 1-2% faster. That is not worth it, at least for me. So in summary: Yes I could already imagine special _JSON_GenerateX functions for the two cases. But if then without the $_JSON_TYPES approach and without changing the behavior of _JSON_Generate(). But this concerns only my repository. The nice thing about open source is that everyone can fork it and rewrite it according to their own ideas. Otherwise, big thanks again for letting me continue to learn collaborative work via github through you!1 point -
I would suggest checking to see if you could perform a silent install using an answer file. P.S. It's likely that you need to run your script with Administrative privileges for the ControlClick to work correctly. Try putting the following line at the beginning of your script -- #RequireAdmin1 point
-
In honor of the 10 year anniversary for my unanswered question, I should tell you I've never found out how to use blatdll.h in AutoIt, but thanks to with Blat's own developer I did manage to solve the Unicode issue by using W in 2 places below (SendW and wstr): DllCall("blat.dll,"int","SendW","wstr", "list of Blat parameters...")1 point
-
Try this: AutoItSetOption('WinTitleMatchMode', 2) WinWait('WebClient') ControlClick('WebClient', '', 'Button5')1 point
-
Huffman encoding/decoding + helpers for binary data
kurtykurtyboy reacted to AspirinJunkie for a topic
Introduction The following UDF can be used to compress a string into a binary via Huffman encoding. To keep the overhead for the huff table integrated in the binary as small as possible, the canonical form of the huffman table was implemented. The UDF accesses many functionalities of the UDF "BinaryHelpers.au3". This is also part of the repository and offers functionalities for simplified handling of binary data in AutoIt. How to use? the following script: #include "Huffman.au3" ; read out the autoitscript.com page as example string Global $sString = BinaryToString(InetRead("https://autoitscript.com")) ConsoleWrite("Original Size: " & BinaryLen(StringToBinary($sString)) & " Bytes" & @CRLF) ; encode the string with a canonical huffman encoding Global $bEncoded = _huff_encodeString($sString) ConsoleWrite("Encoded Size: " & BinaryLen($bEncoded) & " Bytes" & @CRLF & _ "Compress ratio: " & Round((1 - (BinaryLen($bEncoded) / BinaryLen(StringToBinary($sString)))) * 100.0, 1) & ' %' & @CRLF) ; decode the string out of the binary Global $sStringDecoded = _huff_decodeBinary($bEncoded) ; check if original and decoded string are the same ConsoleWrite("$sString == $sStringDecoded: " & ($sString == $sStringDecoded) & @CRLF) produces: Original Size: 157081 Bytes Encoded Size: 102833 Bytes Compress ratio: 34.5 % $sString == $sStringDecoded: True How to further increase the compression potential? Huffman encoding is just a step to be able to compress data. In combination with further steps you can compress the data even more. For example, you can pre-compress the data at the text level and only then encode the data using Huffman. The following extends the above example with a (simple) word repetition compression: which leads to the following result: Original Size: 157081 Bytes Encoded Size: 73333 Bytes Compress ratio: 53.3 % $sString == $sStringDecoded: True >>sourcecode and download on github<<1 point -
Looking for Lazycat (YDY) Direct RTF writer file rtf_writer.zip
pixelsearch reacted to Zedna for a topic
Here is content of my local copy of RTF_writer.au3: ;=============================================================================== ; ; Description: Functions for formatting given text into RTF format ; Requirement(s): None ; Return Value(s): On Success - string with Rich-formatted data ; Author(s): YDY (Lazycat) ; Version: 0.1 ; Date: 15.01.2005 ; ;=============================================================================== ;=============================================================================== ; ; Description: Create empty RTF data block ; Parameter(s): Default font name ; Return Value(s): On Success - string with Rich-formatted data ; ;=============================================================================== Func _RTFCreateDocument($sDefFont) Local $sDoc = "{\rtf1\ansi\deff0" $sDoc = $sDoc & "{\fonttbl{\f0\fnil " & $sDefFont & ";}{\fontplaceholder}}" $sDoc = $sDoc & "{\colortbl \red0\green0\blue0;{\colorplaceholder}}" $sDoc = $sDoc & "{\placeholder}}" Return($sDoc) EndFunc ;=============================================================================== ; ; Description: Format string with given parameters ; Parameter(s): ; $RTF - previously created RTF data ; $sText - text for formatting ; $nColor - text color ; $iSize - text size ; $iFontStyle - font style ; 1 - Bold ; 2 - Italic ; 4 - Underline ; 8 - Strikeout ; $sFont - text font ; Return Value(s): On Success - string with Rich-formatted data ; ;=============================================================================== Func _RTFAppendString($RTF, $sText, $nColor, $iSize, $iFontStyle, $sFont) Local $iFSPos = StringInStr($RTF, "{\fonttbl") Local $iFEPos = StringInStr($RTF, "{\fontplaceholder}}") Local $sFontBlock = StringMid($RTF, $iFSPos, $iFEPos - $iFSPos) Local $iCSPos = StringInStr($RTF, "{\colortbl") + 10 Local $iCEPos = StringInStr($RTF, "{\colorplaceholder}}") Local $sColorBlock = StringMid($RTF, $iCSPos, $iCEPos - $iCSPos) Local $iFontIndex = -1, $iFPos, $sFontStyle = "" Local $asColor, $iColIndex, $sFormatted ; Lookup font table While 1 $iFontIndex = $iFontIndex + 1 $iFPos = StringInStr($sFontBlock, "\f" & $iFontIndex) If not $iFPos Then $RTF = StringReplace($RTF, "{\fontplaceholder}", "{\f" & $iFontIndex & "\fnil " & $sFont & ";}{\fontplaceholder}") Exitloop Endif $sFontBlock = StringTrimLeft($sFontBlock, $iFPos) While StringLeft($sFontBlock, 1) <> " " $sFontBlock = StringTrimLeft($sFontBlock, 1) Wend $sFontBlock = StringTrimLeft($sFontBlock, 1) If StringLeft($sFontBlock, StringLen($sFont)) == $sFont Then Exitloop Wend ; Lookup color table $asColor = StringSplit($sColorBlock, ";") $iColIndex= $asColor[0]-1 For $iCnt = 1 to $asColor[0] - 1 If $asColor[$iCnt] = _RTFGetColor($nColor) Then $iColIndex = $iCnt-1 Exitloop Endif Next If $iColIndex = $asColor[0]-1 Then $RTF = StringReplace($RTF, "{\colorplaceholder}", _RTFGetColor($nColor) & ";{\colorplaceholder}") Endif ; Construct font style If BitAnd($iFontStyle, 1) Then $sFontStyle = $sFontStyle & "\b" If BitAnd($iFontStyle, 2) Then $sFontStyle = $sFontStyle & "\i" If BitAnd($iFontStyle, 4) Then $sFontStyle = $sFontStyle & "\ul" If BitAnd($iFontStyle, 8) Then $sFontStyle = $sFontStyle & "\strike" ; Replace special symbols $sText = StringReplace($sText, "\", "\\") $sText = StringReplace($sText, @CR, "\par") ; Construct formatted block $sFormatted = "{\f" & $iFontIndex & _ "\cf" & $iColIndex & _ "\fs" & $iSize * 2 & $sFontStyle & _ " " & $sText & "}{\placeholder}" $RTF = StringReplace($RTF, "{\placeholder}", $sFormatted) Return($RTF) EndFunc ;=============================================================================== ; ; Description: Return RTF-style formatted color ; Parameter(s): Color numeric value ; Return Value(s): RTF-style formatted color ; ;=============================================================================== Func _RTFGetColor($nColor) $sRed = BitAnd(BitShift($nColor, 16), 0xff) $sGreen = BitAnd(BitShift($nColor, 8), 0xff) $sBlue = BitAnd($nColor, 0xff) Return("\red" & $sRed & "\green" & $sGreen & "\blue" & $sBlue) EndFunc1 point -
Looking for Lazycat (YDY) Direct RTF writer file rtf_writer.zip
pixelsearch reacted to 1957classic for a topic
I think this is what you're looking for. http://autoit.darkhost.ru/files/rtf_writer.zip1 point -
IWantIt Yes, with subclassing: #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GuiMenu.au3> #include <Constants.au3> #include <WinAPI.au3> Global Enum $idOpen = 1000, $idSave, $idInfo $hGUI = GUICreate("Test", 300, 200) $Edit1 = GUICtrlCreateEdit("", 10, 10, 280, 150, BitOR($WS_HSCROLL, $WS_VSCROLL, $ES_MULTILINE)) $hMenu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_AddMenuItem($hMenu, "Open", $idOpen) _GUICtrlMenu_AddMenuItem($hMenu, "Save", $idSave) _GUICtrlMenu_AddMenuItem($hMenu, "Info", $idInfo) GUISetState() $wProcHandle = DllCallbackRegister("_WindowProc", "ptr", "hwnd;uint;wparam;lparam") $wProcOld = _WinAPI_SetWindowLong(GUICtrlGetHandle($Edit1), $GWL_WNDPROC, DllCallbackGetPtr($wProcHandle)) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGui) DllCallbackFree($wProcHandle) Func _WindowProc($hWnd, $Msg, $wParam, $lParam) Switch $hWnd Case GUICtrlGetHandle($Edit1) Switch $Msg Case $WM_CONTEXTMENU _GUICtrlMenu_TrackPopupMenu($hMenu, $wParam) Return 0 Case $WM_COMMAND Switch $wParam Case $idOpen ConsoleWrite("-> Open" & @LF) Case $idSave ConsoleWrite("-> Save" & @LF) Case $idInfo ConsoleWrite("-> Info" & @LF) EndSwitch EndSwitch EndSwitch Local $aRet = DllCall("user32.dll", "int", "CallWindowProc", "ptr", $wProcOld, _ "hwnd", $hWnd, "uint", $Msg, "wparam", $wParam, "lparam", $lParam) Return $aRet[0] EndFunc1 point