Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/28/2015 in all areas

  1. I guess I cheat, I use BinaryToString followed by StringRegExp but this is my solution. Tested with your .skk file searching for "LaserJet 1020" which worked, works on PDFs, .xls, .doc (but NOT .xlsx or .docx unfortunately) and many other file types. Anyhoo, never shared this before, thought this was a good time. Ian Edit - posted an updated version, see my sig for the link.
    2 points
  2. Yashied

    Copy UDF

    LAST VERSION - 1.4 18-May-12 This small library allows simple and reliable way to copy or move files and directories without suspending your script. Moreover, you can get the current state (number of copied bytes, system error code, and other status information) while copying. Also supported copying or moving a multiple files and directories at once (up to 256). Working with this UDF is similar with the InetGet() function. For more information, see description for each function within the library. Available functions Copy UDF Library v1.4 (x86 and x64) Previous downloads: 1162 Copy.zip Examples Copying a multiple files at once GUI, files copying GUI, directories copying
    1 point
  3. funkey

    CSV-Editor V0.8

    Hello friends! My new script is used to edit CSV-files. Just doubleclick the entries you want to edit! Add CRLF to itemtext with Ctrl+{Enter} Now you can create new files. Have fun! Version-Updates: CSV-Editor.ico CSV-Editor V0.8a.au3
    1 point
  4. llewxam

    CSV Viewer

    I could swear that I saw someone else had a CSV viewer script posted but no amount of searching found it. If someone knows of one that has been done before, please post a link to it. I write many scripts that save information to CSV files, but got tired of using Excel to view them because of having to resize the columns to view all of the information. Yes there are ways of resizing the columns, but I decided to write a viewer to make life a little easier. There are some configurable options, such as font used, font size, weight, and underlining, as well as optional automatic column width resizing thanks to Melba23's StringSize UDF, now built-in rather than having to download the UDF. Please be aware that when using the resize option it will take about twice as long to run the script. For a fairly sane file it is not at all a big deal, but feed it an 8MB file with 130 columns and 11,500 rows (about 1.5 million elements) and it takes quite a long time!! This script also takes a lot of RAM to run, the 8MB file I used above took over 200MB of RAM. I'd like to see other ideas, so please post 'em if you got 'em. Enjoy Ian EDIT: Updated code CSV Viewer.zip
    1 point
  5. _WinAPI_SetWindowsHookEx for monitoring/interacting 3rd party applications.
    1 point
  6. better, as the WMI query only returns the necessary info Run("C:\Windows\SysWOW64\notepad.exe") Run("C:\Users\notepad.exe") sleep(2500) _ProcessCloseByPath("C:\Windows\SysWOW64\notepad.exe") Func _ProcessCloseByPath($sPath) $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\ROOT\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT ExecutablePath,ProcessId FROM Win32_Process WHERE ExecutablePath = " & '"' & stringreplace($sPath, "\" , "\\") & '"', "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $sPID = $objItem.ProcessId processclose($sPID) Next Endif EndFunc
    1 point
  7. a WMI version. Run("C:\Windows\SysWOW64\notepad.exe") Run("C:\Users\notepad.exe") sleep(2500) _ProcessCloseByPath("C:\Windows\SysWOW64\notepad.exe") Func _ProcessCloseByPath($sPath) $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\ROOT\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $sExePath = $objItem.ExecutablePath If $sExePath = $sPath Then $sPID = $objItem.ProcessId processclose($sPID) EndIf Next Endif EndFunc
    1 point
  8. Mugen: Actually, you not right. LZMA2, except multithreating, has better compression ratio for data than almost can't be compressed. That is what I need. Not fast, but strong for such data.
    1 point
  9. Well, you are trying to run a script the second you push a button in a 3rd party software. Which is proving to be a challenge. My suggestion is to start your 3rd party program with your script. Which can in turn push this button and any other functions you care to add. Example: I have a cubase (music mixing software) template that I start anytime I want to practice. It needs 20-40 seconds to load and there are several pop ups that have to be clicked for it to continue loading. I made a script that starts cubase with the practice template and continues running, watching for the pop ups and clicks on them as they appear. Just a suggestion on a different way to proceed, may or may not be viable for your situation. good luck ! Bill
    1 point
  10. UEZ

    GUI/MsgBox error

    OMG, it's very simple why it isn't working. WTF, your label in line is overlapping all controls below which cause an unresponsible button behaviour! Use this line instead: Local $MsgM = GUICtrlCreateLabel("Application has completed all tasks. Please consider the following options.", 15, 35, 255, 40, $SS_CENTER) or add GUICtrlSetState(-1, $GUI_DISABLE) just after that particular line to disable the lable control. LOL Br, UEZ PS: I love BBQ
    1 point
  11. I do a lot of backup and restores in the shop but with home user machines. Often the problem is people dont store there stuff in the correct places, the amount of times i see picture or music folders on the root is unreal. So whilst this approach works for a business scenario just be aware it would miss other files if it was a home user who thinks he know better As for robocopy look in my sig for an easy version, ive done thousands of backups now with robocopy and i would trust it over any other method Alternate copy params with logfile if you need it If $Os = "V-" Then $sCopyParams = '/COPY:D /S /ZB /XJD /XJF /R:0 /W:0 /V /LOG:C:\Backup\Logfile.txt /XA:SHT' ; XP Params /NJS removed for the log Else $sCopyParams = '/COPY:D /S /ZB /XJD /XJF /R:0 /W:0 /V /MT:16 /LOG:C:\Backup\Logfile.txt /XA:SHT' ; Vista + Params /NJS removed for the log EndIf Another way is like this if i didnt need includes and excludes but wanted a progress _CopyFolder(@UserProfileDir & "\Pictures", $sDestination & '\Pictures') Func _CopyFolder($sSourceFolder, $sDestFolder) Local $ipct DirRemove($sDestFolder, 1) Local $iSourceSize = DirGetSize($sSourceFolder), $iDestSize Local $pid = Run(@AutoItExe & ' /AutoIt3ExecuteLine "DirCopy(''' & $sSourceFolder & ''', ''' & $sDestFolder & ''')"') Do GUICtrlSetData($hLabel3, "Checking " & StringReplace($sSourceFolder, @UserProfileDir & "\", "")) $iDestSize = DirGetSize($sDestFolder) $ipct = $iDestSize / $iSourceSize) * 100 GUICtrlSetData($hProgress, $ipct) GUICtrlSetData($hLabel4, $ipct & ' Percent Complete') Sleep(20) Until Not ProcessExists($pid) EndFunc ;==>_CopyFolder Also can you not back them all at once when you make the backups? this may work for you Func _UserList() ;BrewmanNH origanal author Local $UserList, $aUserList, $X, $aUserList[10], $UserList[10] If $sDataCheck = 'V+' Then $UserList = _FileListToArray($sSource & 'Users', "*.*", 2) For $I = 1 To $UserList[0] Select Case $UserList[$I] = "All Users" Case $UserList[$I] = "Default" Case $UserList[$I] = "Default User" Case $UserList[$I] = "Public" Case Else $aUserList[$X] = $UserList[$I] $X += 1 If $X >= UBound($aUserList) Then ReDim $aUserList[UBound($aUserList) + 10] EndIf EndSelect Next ReDim $aUserList[$X] ElseIf $sDataCheck = 'V-' Then $UserList = _FileListToArray($sSource & 'Documents and Settings', "*.*", 2) For $I = 1 To $UserList[0] Select Case $UserList[$I] = "All Users" Case $UserList[$I] = "Default User" Case $UserList[$I] = "NetworkService" Case $UserList[$I] = "LocalService" Case $UserList[$I] = "Administrator" Case Else $aUserList[$X] = $UserList[$I] $X += 1 If $X >= UBound($aUserList) Then ReDim $aUserList[UBound($aUserList) + 10] EndIf EndSelect Next ReDim $aUserList[$X] EndIf _ArrayDisplay($aUserList) ;$sUserList = _ArrayToString($aUserList, "|") Return $aUserList EndFunc ;==>_UserList
    1 point
  12. Melba23, I know I have said it before, but I love you man!!! I will add a special case to my above app shortly and start a new thread in the Examples section with the updated code. THANKS!!! Ian
    1 point
  13. llewxam, See >this post to understand why - and subsequent posts to see how you can still search these file types. M23
    1 point
×
×
  • Create New...