diff --git a/Excel Operations/Excel Save As/ExcelSaveAs.vbs b/Excel Operations/Excel Save As/ExcelSaveAs.vbs index 6418775..c300a76 100644 --- a/Excel Operations/Excel Save As/ExcelSaveAs.vbs +++ b/Excel Operations/Excel Save As/ExcelSaveAs.vbs @@ -2,10 +2,18 @@ InputFile = Wscript.Arguments(0) SheetName = Wscript.Arguments(1) OutputFile = Wscript.Arguments(2) Ext = Wscript.Arguments(3) +Dim password +If WScript.Arguments.Count > 4 then + password = Wscript.Arguments(4) +End If Set objExcel = CreateObject("Excel.application") objExcel.application.visible=false objExcel.application.displayalerts=false -set objExcelBook = objExcel.Workbooks.Open(InputFile) +If Not isEmpty(password) then + set objExcelBook = objExcel.Workbooks.Open(InputFile,,,,password) +Else + set objExcelBook = objExcel.Workbooks.Open(InputFile) +End If objExcel.Sheets(SheetName).Select objExcelBook.SaveAs OutputFile, Ext objExcel.Application.Quit diff --git a/Scripts/PreventScreenLockDaemon.vbs b/Scripts/PreventScreenLockDaemon.vbs new file mode 100644 index 0000000..0f17f3b --- /dev/null +++ b/Scripts/PreventScreenLockDaemon.vbs @@ -0,0 +1,9 @@ +' Prevent computer lock screen during automation process +' Need to [Open Program/File] Command,not [Run Script] Command + +Set WshShell = WScript.CreateObject("WScript.Shell") +While True + WScript.Sleep 1000*60 + WshShell.SendKeys "{NUMLOCK}" + WshShell.SendKeys "{NUMLOCK}" +Wend