Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/14/2017 in all areas

  1. Version 3.1.0

    648 downloads

    Here is an UDF for managing printers. Features are : - add, remove or rename a printer - add or remove a driver - add or remove a TCP/IP printer port - add or remove a LPR printer port - connect to a remote printer - enum printers and there configuration and properties - pause resume or cancel all jobs of a printer - checks if a printer exists - print a test page - set the default printer
    1 point
  2. benners

    Less than today's date

    Try this. You can edit it to give you what you want #include <Array.au3> #include <Date.au3> #include <Excel.au3> Local $v_Return = Column_GetValues(@ScriptDir & '\Test.xls') If Not IsArray($v_Return) Then MsgBox(0, 'C Cell', $v_Return) Else _ArrayDisplay($v_Return, 'C Cell') EndIf ; #FUNCTION# ==================================================================================================================== ; Syntax ........: Column_GetValues($s_WorkBook[, $i_ReturnArray = 0]) ; Parameters ....: $s_WorkBook - The string path to the excel file ; $i_ReturnArray - Integer 0 or 1 ; Return values .: Success - 0: Returns a delimited string and shows a message box for every match ; - 1: Returns an array ; =============================================================================================================================== Func Column_GetValues($s_WorkBook, $i_ReturnArray = 0) Local $o_Excel = _Excel_Open(False) Local $o_Workbook = _Excel_BookOpen($o_Excel, $s_WorkBook) Local $s_ColumnLetter = _Excel_ColumnToLetter($o_Workbook.ActiveSheet.UsedRange.Columns.Count) Local $as_RangeRead = _Excel_RangeRead($o_Workbook, Default, $s_ColumnLetter & '2:' & $s_ColumnLetter & $o_Workbook.ActiveSheet.UsedRange.Rows.Count) Local $s_CellC = '' For $i = 0 To UBound($as_RangeRead) - 1 If _DateStandardToCalcDate($as_RangeRead[$i]) < Number(StringRegExpReplace(_NowCalcDate(), '\D', '')) Then If Not $i_ReturnArray Then MsgBox(0, 'Row: ' & $i + 2 & ' Cell C', _Excel_RangeRead($o_Workbook, Default, 'C' & $i + 2)) $s_CellC &= _Excel_RangeRead($o_Workbook, Default, 'C' & $i + 2) & '|' EndIf Next _Excel_Close($o_Excel) ; trim the trailing delimter $s_CellC = StringTrimRight($s_CellC, 1) If $i_ReturnArray Then Return StringSplit($s_CellC, '|') Return $s_CellC EndFunc ;==>Column_GetValues Func _DateStandardToCalcDate($s_Date) If Not StringRegExp($s_Date, "^(\d{1,2})/(\d{1,2})/(\d{4})$") Then Return SetError(1, 0, "") If @error Then Return SetError(1, 0, "") Local $s_DateNew = StringRegExpReplace($s_Date, "(\d{2})/(\d{2})/(\d{4})", "$3/$1/$2") $s_DateNew = StringRegExpReplace($s_DateNew, "(\d{2})/(\d)/(\d{4})", "$3/$1/0$2") $s_DateNew = StringRegExpReplace($s_DateNew, "(\d)/(\d{2})/(\d{4})", "$3/0$1/$2") $s_DateNew = StringRegExpReplace($s_DateNew, "(\d)/(\d)/(\d{4})", "$3/0$1/0$2") Return Number(StringRegExpReplace($s_DateNew, '\D', '')) EndFunc ;==>_DateStandardToCalcDate
    1 point
  3. Hi meoit, you'll need _WinAPI_GetDriveBusType() The drive should be both $DRIVE_BUS_TYPE_USB $DRIVE_BUS_TYPE_1394 If you want to be able run WMI commands you must first deploy the WinPE-WMI.cab from Windows ADK to the boot image might as well add these too: WinPE-HTA.cab WinPE-MDAC.cab WinPE-Scripting.cab
    1 point
  4. Hello again meoit Your request is a bit strange. What are you trying to do with this? Maybe there is a better solution? If your 2 HDD are plugged with USB, the only thing that can detect one from the other is the size and the model.
    1 point
  5. 1 point
  6. So does your test.exe have a window and is the title named test.exe? Can you post the test.au3 file?
    1 point
  7. FileInstall("C:\original\file\location\on\hard\drive\written\out\completely.exe", @scriptdir & "\bin\completely.exe",1) The first parameter has to be completly written out. NO VARIABLES. NO MACROS. The second parameter can contain macros or variables. The third parameter is opitonal.
    1 point
×
×
  • Create New...