-
Posts
14 -
Joined
-
Last visited
Everything posted by MimiOne
-
Very nice. Thank you !! M.C. From France
-
UDF to support SFTP protocol using PSFTP
MimiOne replied to Lupo73's topic in AutoIt Example Scripts
A small step for "_SFTP_ProgressDownload" (which works properly for files). I do not understand lines 42 / 70 (in Spoiler) cordially -
UDF to support SFTP protocol using PSFTP
MimiOne replied to Lupo73's topic in AutoIt Example Scripts
Hello Lupo73, thank you very much for this UDF The _SFTP_DirDelete function loops to infinity trying to erase "." and ".." I added a test: If ($ aFileList [$ A] [0] <> ".") And ($ aFileList [$ A] [0] <> "..") Then ... do not know not so "." and ".." are sytematically present at the top of the list on all the servers ; #FUNCTION# ==================================================================================================================== ; Name...........: _SFTP_DirDelete ; Description ...: Deletes a Directory on a SFTP server. ; Syntax.........: _SFTP_DirDelete ( $hConnection, $sRemoteDir ) ; Parameters ....: $hConnection - as returned by _SFTP_Connect(). ; $sRemoteDir - The remote Directory to be deleted. ; Return values .: Success - 1 ; Failure - 0, sets @error ; |1 - The connection is closed ; |2 - Directory not found ; |3 - Directory probably contains not removable files ; |4 - Failed listing Directory ; |5 - Other error ; Author ........: Lupo73 ; Modified.......: ; Remarks .......: ; Related .......: _SFTP_Connect, _SFTP_FileDelete, _SFTP_ListToArrayEx ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _SFTP_DirDelete($hConnection, $sRemoteDir) If ProcessExists($hConnection) = 0 Then Return SetError(1, 0, 0) EndIf Local $aFileList = _SFTP_ListToArrayEx($hConnection, $sRemoteDir) If @error Then Return SetError(4, 0, 0) EndIf If $aFileList[0][0] > 0 Then For $A = 1 To $aFileList[0][0] If StringLeft($aFileList[$A][2], 1) <> "d" Then _SFTP_FileDelete($hConnection, $sRemoteDir & "/" & $aFileList[$A][0]) Else ;-- Do not try to delete "." and ".." --------------------------- If ($aFileList[$A][0] <> ".") And ($aFileList[$A][0] <> "..") Then _SFTP_DirDelete($hConnection, $sRemoteDir & "/" & $aFileList[$A][0]) EndIf If @error Then Return SetError(5, 0, 0) EndIf Next EndIf ;-- Etc .... -------------- EndFunc -
AutoIt V3.3.14.3: _ArrayAdd problem ?
MimiOne replied to MimiOne's topic in AutoIt Technical Discussion
Thank you for this quick reaction like lightning! -
Hello I notice a malfunction of the function "_ArrayAdd". The table is enlarged by one location, but this slot is empty. You confirm ? #include <Array.au3> #include <MsgBoxConstants.au3> Local $aArray_Base[2] = ["Org Item 0", "Org item 1"] _ArrayDisplay($aArray_Base, "1D - Base array") ; Add a single item Local $aArray = $aArray_Base _ArrayDisplay($aArray_Base, "1D before") Local $sSingleFill = "New Item 2" _ArrayAdd($aArray, $sSingleFill) _ArrayDisplay($aArray, "1D after") (code extracted from the aid example)
-
Fast topic. Clickable picture in GUI
MimiOne replied to Verssuss's topic in AutoIt General Help and Support
Hello Warning ! Do this test WITHOUT the image file. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $Pic1 = GUICtrlCreatePic("C:\Users\Andrea\Pictures\Uplay\For Honor - Open Beta\For Honor - Open Beta2017-2-10-18-48-25.jpg", 224, 112, 100, 100) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Pic1 Sleep (5000) beep() EndSwitch WEnd Do you understand why? cordially -
Hi Ward The keys of type "integer" or of type "string" are allowed in Map variable (Autoit) (as well as in scripting dictionary), and are not the same. The Json encoding results in a change of type of keys, type "integer". Example: #include <Array.au3> #include "JsonMap.au3" ConsoleWrite("======================== MAP ===========================" & @CRLF) ;-- Tableau 2D à include dans la Map -- Global $aTest1[2] = ['ROUGE', 'VIOLET'] Global $Map[], $MapOut $Map["Cle1"] = "DataCle1" $Map["Cle2"] = "DataCle2" $Map["2"] = "DataCleString" $Map[2] = "DataCleNum" $Map["Cle3"] = $aTest1 Global $code = Json_Encode($Map) ConsoleWrite('Map Code: ' & $code & @CRLF) $MapOut = Json_Decode($code) ;-- Affichages ------------------------------- Global $aKeys = MapKeys ($MapOut) ;~ _ArrayDisplay ($aKeys) ConsoleWrite("Type Cle1 = " & VarGetType($aKeys[0]) & @CRLF) ConsoleWrite("Type Cle2 = " & VarGetType($aKeys[1]) & @CRLF) ConsoleWrite('Type "2" = ' & VarGetType($aKeys["2"]) & @CRLF) ConsoleWrite("Type 2 = " & VarGetType($aKeys[2]) & @CRLF) ConsoleWrite("$MapOut[Cle1]= " & $MapOut["Cle1"] & @CRLF) ConsoleWrite("$MapOut[Cle2]= " & $MapOut["Cle2"] & @CRLF) ConsoleWrite('$MapOut["2"]= ' & $MapOut["2"] & @CRLF) ConsoleWrite("$MapOut[2]= " & $MapOut[2] & @CRLF) ;~ _ArrayDisplay($MapOut["Cle3"]) ;-- Nouveau codage du résultat ---------- Global $codeOut = Json_Encode($MapOut) ConsoleWrite('MapOut Code: ' & $codeOut & @CRLF) ;-- comparaison des codes --------------- If $codeOut = $code Then ConsoleWrite("$codeOut = $code" & @CRLF) Else ConsoleWrite("$codeOut <> $code" & @CRLF) EndIf result: Kind regards.
-
FRED: Format Recursive Encapsulation Data
MimiOne replied to Luigi's topic in AutoIt Example Scripts
Very very useful. Thank you Can we put an array or another "Scripting.Dictionary" in a "Scripting.Dictionary"? Could you integrate the new type "MAP" of the beta 3.3.16 in addition to Stripting dictionary. Thank you -
Look at this: http://www.autoitscript.fr/forum/viewtopic.php?f=6&t=9572 Kind regards.
-
OK.... http://www.prgrep.com/
-
I expressed myself badly. What I propose would not list files of name: * old*.au3 (for example: StringFinder_v1.2.3_old1.au3 in the "Backup" directory created by Scite.) This feature cannot be added to the list contained in "_FileExtCheck". I'm wrong?
-
Excellent! Suggestion: Add a field to exclude certain files from the search result (for example: " *old*.au3 " to not list the backups). Kind regards M.C.
-
Wonderful idea! Is it you please open the browser by default, and not systematically IE... Kind regards M.C.
-
Dear fellow citizen. There are at least a bug: Impossible de ce connecté!! >>> Impossible de se connecter !!Commande a envoyé: >> Commande à envoyerCe sera déjà plus "propre" Kind regards