Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/11/2016 in all areas

  1. Ah, sorry for that. Have fun launching fast neutrons around!
    2 points
  2. The Excel UDF comes with a function to convert column letters to numbers and vice versa. Please check _Excel_ColumnToLetter and _Excel_LetterToColumn.
    2 points
  3. Here is the rewritten version of this UDF. See my comments HERE. Please test the shit out of this thing. It was a major headache, and I want to make sure I didn't miss something. Thanks! Update 2013/05/28 - Fixed missing @error return in _Zip_ItemExists - Clarified a few @error return value meanings - Added an additional check and @error code to _Zip_DeleteItem - Clarified some of the header notes, esp regarding behavior on XP Update 2011/12/08 - Fixed recursion in ListAll function Update 2011/12/07 - Fixed recursion error in CountAll function - updated objects to conform to new COM syntax (parenthesis req'd for methods) Update 2011/07/01 - Reverted change to AddItem function - **Adding an item directly to a sub folder on XP will FAIL Update 2011/06/30 - Fixed traversing namespaces on Windows XP - Added note that overwrite fails on XP Update 2011/01/13 - Fixed bug adding items to a subfolder that doesn't exist yet Update 2010/08/27 - Fixed bug with trailing 's Update 2010/07/16 - Better error reporting in _Zip_AddItem function Update 2010/07/02 - Added credits. - Added trancexxx's suggestion to remove any left over temporary directories. - Replaced some StringTrim calls with cleaner StringRegExpReplace calls. - Moved a few repetitive lines of code into functions. - Moved a few repetitive lines of code into functions. - Moved a few repetitive lines of code into functions. =========================== _Zip.au3
    1 point
  4. This works with the provided test string. Obviously this could not work with the real (not provided) string $str = "data1 data1 data1" & @CRLF & _ "data1 data1 data1" & @CRLF & _ "STARTING TEXT TAG" & @CRLF & _ "data2 data2 data2" & @CRLF & _ "data2 data2 data2" & @CRLF & _ @CRLF & _ "01010101010101010101010101010101010101" & @CRLF & _ "ENDING TEXT TAG" & @CRLF & _ "data3 data3 data3" & @CRLF & _ "data3 data3 data3" & @CRLF msgbox(0,"", $str) $str = StringRegExpReplace($str, '(?s)STARTING TEXT TAG.*?ENDING TEXT TAG\R?', "") msgbox(0,"", $str)
    1 point
  5. See my Signature for a link to the Beta location. Jos
    1 point
  6. Either way, I have added the 500 ms sleep and uploaded a new Beta of AutoIt3Wrapper, so you could start using that and see if that works fine now. Thanks for the testing checking and reporting all of this. Jos
    1 point
  7. You all can keep guessing as long as you want, but when the OP is failing to provide a running reproducers then that is all what it is... guessing. Jos
    1 point
  8. A3X are really just EXE files without the Autoit interpreter attacked. They won't help with multitasking but they will help with "False positive" virus detection and because they don't have the interpreter attached they are smaller. The structure I outlined lends itself to multitasking as multiple "Overseer/Tasker" can run simultaneously. The "Scheduler" just needs to have a queue to know what is and isn't running. If you want others help then you should get the "white paper" / "structure" settled so that others can comment on it and help where they can. I would love to see what you have in mind With out it people will just stand back and wait as they won't know where they can help you or even if they can help you. Without clear plan you may not get much help until you have a almost finished system. Also a good plan means that you won't hit as many brick walls. as you have a map to follow.... As I said I've been over a lot of the ground you will traverse.. I'm here to help.
    1 point
  9. Hey John! Thanx for your input, unfortunatly i havn't looked in to A3X yet but if it will help with "multitasking" i'm all for it and will certainly try to implement it. Also, thanx for your view on the structure, even if i havn't made the system structure public (since it's in constant flux) i believe we have the same opinion on how the system should be built Do take a look at the code/functions and holler if you need me to clarify something. Even though i've made "personal" quotes in the code there is no white paper yet. On a sidenote, i've completed the file transfer function of the manager module and will upload a new version as soon as i've polished it a bit. Cheers!
    1 point
  10. @carl1905, Rather than just "like", I'd prefer a yes or no statement about whether the (new) code hidden in this post actually delivers the right result The difference here is that we request __WinAPIWideCharToMultiByte to return a string instead of a struct (the struct being used inside this function still being using byte itself). Sorry if that's painful but we ought to fix that correctly.
    1 point
  11. Within the same loop: Local $average, $total, $max For $n = 1 To $lt1[0][0] $average += $lt1[$n][12] $total += $lt1[$n][12] If $lt1[$n][12] > $max Then $max = $lt1[$n][12] Next $average = $average / $lt1[0][0]
    1 point
  12. ? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <String.au3> $Form1 = GUICreate("Form1", 475, 285) $Edit1 = GUICtrlCreateEdit("", 72, 72, 185, 89) GUICtrlSetData(-1, "") $Label1 = GUICtrlCreateLabel("", 296, 224, 44, 25) $Label2 = GUICtrlCreateLabel("Number of lines to be introduced:", 104, 224, 181, 17) GUISetState(@SW_SHOW) Local $lines0 While 1 $lines = ControlCommand($Form1, "", $Edit1, "GetLineCount") If $lines <> $lines0 Then guictrlsetdata($label1, $lines) $lines0 = $lines EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
    1 point
  13. Now, can you please check this version and tell me whether it also works, so that I give the correct advice in the ticket I created?
    1 point
  14. What did you excpect that happen in your script after exit?
    1 point
  15. Change this line If $editread => 0 Then to If UBound($editread) > 0 Then
    1 point
  16. Yup, and in both of those topics the value from the edit box are split and you can get the line count from the array returned from StringSplit. And if you'd read the help topic for StringSplit you can see how many lines would be in the edit when you split it.
    1 point
  17. corgano

    [s]Unzipping[/s] Zipping

    Thanks! That is almost perfect, but it needs to extract all files in the file to the output folder. I am working on modifying it. The UDF I am using now uses a DLL and is rather large. *EDIT* I was able to modify it to extract all files in the folder, and I removed a few of the things i didn't need. Very nice, a lot smaller than the one I was using (over 100 lines and a DLL to about 50 lines) Thank you all. here's the func _ExtractZip("C:\Users\David\Desktop\New folder\Maps1.zip", "C:\Users\David\Desktop\New folder\maps") ; #FUNCTION# ;=============================================================================== ; ; Name...........: _ExtractZip ; Description ...: Extracts file/folder from ZIP compressed file ; Syntax.........: _ExtractZip($sZipFile, $sDestinationFolder) ; Parameters ....: $sZipFile - full path to the ZIP file to process ; $sDestinationFolder - folder to extract to. Will be created if it does not exsist exist. ; Return values .: Success - Returns 1 ; - Sets @error to 0 ; Failure - Returns 0 sets @error: ; |1 - Shell Object creation failure ; |2 - Destination folder is unavailable ; |3 - Structure within ZIP file is wrong ; |4 - Specified file/folder to extract not existing ; Author ........: trancexx, modifyed by corgano ; ;========================================================================================== Func _ExtractZip($sZipFile, $sDestinationFolder, $sFolderStructure = "") Local $i Do $i += 1 $sTempZipFolder = @TempDir & "\Temporary Directory " & $i & " for " & StringRegExpReplace($sZipFile, ".*\\", "") Until Not FileExists($sTempZipFolder) ; this folder will be created during extraction Local $oShell = ObjCreate("Shell.Application") If Not IsObj($oShell) Then Return SetError(1, 0, 0) ; highly unlikely but could happen EndIf Local $oDestinationFolder = $oShell.NameSpace($sDestinationFolder) If Not IsObj($oDestinationFolder) Then DirCreate($sDestinationFolder) ;~ Return SetError(2, 0, 0) ; unavailable destionation location EndIf Local $oOriginFolder = $oShell.NameSpace($sZipFile & "\" & $sFolderStructure) ; FolderStructure is overstatement because of the available depth If Not IsObj($oOriginFolder) Then Return SetError(3, 0, 0) ; unavailable location EndIf Local $oOriginFile = $oOriginFolder.Items();get all items If Not IsObj($oOriginFile) Then Return SetError(4, 0, 0) ; no such file in ZIP file EndIf ; copy content of origin to destination $oDestinationFolder.CopyHere($oOriginFile, 20) ; 20 means 4 and 16, replaces files if asked DirRemove($sTempZipFolder, 1) ; clean temp dir Return 1 ; All OK! EndFunc
    1 point
×
×
  • Create New...