Jump to content

Jeep

Members
  • Posts

    7
  • Joined

  • Last visited

About Jeep

  • Birthday 08/12/1957

Profile Information

  • Location
    Belgium

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Jeep's Achievements

Seeker

Seeker (1/7)

2

Reputation

  1. Hello Logan3jO13, I take your remarks into consideration and cleaned up the files a bit.
  2. Hello Skeletor, That's exactly what the function do: simplify the use of basic function already implemented in AutoIt. I've spend few hours playing with all the basic Crypt functions and it's my result how to do simply the job.
  3. Dear Skeletor, Encryption method are one of the method supported by _Crypt_EncryptData (see _Crypt_DeriveKey : creates a key from algorithm and password) : The constants are defined in "#include <Crypt.au3>" $CALG_AES_128 128 bits $CALG_AES_192 192 bits $CALG_AES_256 256 bits $CALG_DES 56 bits $CALG_3DES 168 bits $CALG_RC2 128 bits $CALG_RC4 128 bits You may use these constants as the value supplied for $iAlgorithm parameter in StringEncrypt and StringDecrypt. The default is $CALG_RC4. Use the same value in the two functions if you would like to receive the correct result :-).
  4. Here is an other UDF for string handling : Date handling _StringDateConvert: convert a date from one format ("YMD", "MDY" or "DMY") to another. _StringIsDate: checks if a date with a given format is valid String management _StringCount: count of occurrences that appear in a string _StringFormatBytesSize: formatting a dimension expressed in bytes (bytes) in MB, TB, ...) _StringIsEndingWith: check if a string end with some characters _StringIsStartingWith: check if a string start with some characters _StringJoinArray: concatenate elements of an array to rebuild a string _StringPadLeft: filling a string with characters on the left _StringPadRight: fill a string with characters on the right _StringRemoveFrenchAccent: remove french accent _StringRemoveChars: deleting characters from a string _StringStrip: eliminate characters at the begin and/or at the end of a string _StringTitleCaseFrench: capitalize the first letter of each word with elimination of french accents _StringWSClean: simple replacement of "White Spaces", remove beginning and trailing spaces and multiple spaces removal Any comments, suggestions for improvement or constructive criticism are welcome. Below you will find the UDF and a demo program. JPD_String.zip
  5. Here is a small library (UDF) that I use all the time. Not transcendent, it’s just to simplify my life. When I use the ConsoleWrite function, more than 99.99 percent, I go to the line (Newline), more than 99.99 %, parameters à the same except information that i exam. _CW is born. The second one _CW_Fmt allows to display marks (Fmt for Formatting) and allows to evaluate the format the length of a variable and the position of some characters without counting too much :-). For the functions derived from MsgBox () again the same observation, always the same parameters following the context: Info, Error or Warning. Thus were born _MB_Info, _MB_Error and _MB_Warning. As for _MB_IsOk, the same observation about the logical answer we are interested in a question with two choices: agree or disagree and not much else (True or False). All your remarks, suggestions and constructive criticism are welcome. JPD_Simply.au3 JPD_Simply_Demo.au3
  6. Thanks everybody for your replies. Chimp, a special thanks. If I replace @CR @LF by @LF & @CR in my original string, now i found @LF in the result. If we replace multi spaces char by one, StringStripWS keep the first one. it's a normal behaviour of that function not a bug. Melba23, I promise to use "Code tags" the next time :-). There are not on the same place on the french site. Thanks for your welcome (merci pour votre "bienvenue"). Bye
  7. Hello, I'm comming from the french site "Autoitsript.fr" with the following question or problem. I try to use StringStripWS to clean spaces and control characters in a string. Here is my code. #include <String.au3> #include <StringConstants.au3> #include <Array.au3> ;---- Part 1 Local $sText = @TAB & "This is a new story." & @CR & @LF & "Once upon a time ... " Local $sCheck = "" $sCheck = StringStripWS($sText, BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING, $STR_STRIPSPACES)) ;$sCheck = StringStripWS($sText, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) ConsoleWrite($sCheck & @CRLF) For $i = 1 to stringlen($sCheck) ConsoleWrite(stringmid($sCheck,$i,1) & "-" & Asc(stringmid($sCheck,$i,1)) & @CRLF) next ; Part 2 --- Workarround submited by "jchd" on he french site Local $sText = @TAB & " This is a new story." & @CR & @LF & "Once upon a time ... " Local $sCheck = StringStripWS(StringRegExpReplace($sText, "[[:space:]]+", " "), $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) ConsoleWrite(">" & $sCheck & "<" & @LF) _ArrayDisplay(StringToASCIIArray($sCheck)) The help file tells : But if we check the console after program execution , the CarriageReturn (Chr(13) is still there. This is a mistake of the program, a bug or a feature of StringStripWS or a mistake in the help file. I use AutoIt v3.3.14.5. We have already a workaround (Part 2). Thanks in advance for your replies.
×
×
  • Create New...