Posts

Showing posts from February, 2016

Tiling Window Manager Help

Image
What is Tiling Window Manager? Here is the features: Batch start many files and tile windows. Edit the batch tasks.  Tile windows vertically. Tile windows horizontally. Show an about dialog. Install It is a portable executable file. Download and extract the zip file to any folder. Run There are two files in the folder. Double click the executable file  Tiling Window Manager - Press WIN+Q to start.exe It will stay in the system tray. Press WIN+Q combination keys to start the menu of Tiling Window Manager. You can edit the batch tasks by clicking the Manage Shortcuts item. It will open the Shortcuts folder. Move some files into the batch task folder. And rename the batch task folder as any text. I create a batch task folder. The folder name is  Robot Project . Then place two shortcut files index.html and index.js into it. OKay, Now I have a batch task. Press  WIN+Q  combination keys again. The batch task will show in the  menu of Tiling Window Manager. Clic

How to write data into a excel file using vbscript

' This sentence is not work. 'Option Explicit Dim objExcel, strExcelPath, objSheet ' You need to create the Example.xls file first. strExcelPath = "c:\Scripts\Example.xls" ' Open specified spreadsheet and select the first worksheet. Set objExcel = CreateObject("Excel.Application") objExcel.WorkBooks.Open strExcelPath Set objSheet = objExcel.ActiveWorkbook.Worksheets(1) ' Modify a cell. row 3, col 2 objSheet.Cells(3, 2).Value = "Test" ' Add a row before row 5. objSheet.Range("B5").EntireRow.Insert ' Label the new rows. Row 4 is unchanged, ' but what was row 5 is now row 6. objSheet.Cells(4, 2).Value = "Row 4" objSheet.Cells(5, 2).Value = "Row 5" objSheet.Cells(6, 2).Value = "Row 6" ' Save and quit. objExcel.ActiveWorkbook.Save objExcel.ActiveWorkbook.Close objExcel.Application.Quit Check the file exist. If you want to do this. strFile = "c:\Scripts\Report.txt ' C

How to pass arguments into a batch file

The batch file is echo %1 echo %2 Save this file as arguments.bat . In the command line we can type this command arguments.bat arg1 arg2 . It will output arg1 arg2 Reference http://stackoverflow.com/questions/26551/how-to-pass-command-line-parameters-to-a-batch-file

Format date as yyyy-mm-dd using vbscript

Function GetFormattedDate strDate = CDate(Date) strDay = DatePart("d", strDate) strMonth = DatePart("m", strDate) strYear = DatePart("yyyy", strDate) If strDay < 10 Then strDay = "0" & strDay End If If strMonth < 10 Then strMonth = "0" & strMonth End If GetFormattedDate = strYear & "-" & strMonth & "-" & strDay End Function 'For example: the date string will be 2011-03-21 GetFormattedDate() Reference http://www.w3schools.com/vbScript/func_formatdatetime.asp

How to declare a global variable in vbscript

Global variable: a variable is outside of any function or sub function Dim x Function y(a) x = x+a y=x End Function Reference http://arstechnica.com/civis/viewtopic.php?t=905411

How to make Google Chrome faster

Image
Back to the default settings After I finish all steps, my settings page become blank and auto refresh never stop. I reinstall the chrome browser then the settings page appears again. Now, you can back to the default settings, it will give you a stable chrome browser. Go to the location  chrome://flags. Click the "Reset all to default" button at the right side. Then click the "Relaunch" button to restart your browser. Go to the location  chrome://settings . Click the  "Reset settings"  button at the bottom side of the page. Clear browsing data Every month you should clear your browsing data. Because the browsing data will make you browse site faster. So you don't clear these every day. You can clear it for privacy reason. Hit Ctrl+H . Click the "Clear browsing data..." button. Check these options Browsing history Download history Cookies and other site and plugin data Cached images and files Hosted app data Click

How to get the output of a command using batch script

@ECHO OFF IF NOT "%1"=="" GOTO ADDV SET VAR= FOR /F %%I IN ('DIR *.TXT /B /O:D') DO CALL %0 %%I SET VAR GOTO END :ADDV SET VAR=%VAR%!%1 :END Reference  http://stackoverflow.com/questions/108439/how-do-i-get-the-result-of-a-command-in-a-variable-in-windows

How to write variable to a file using batch script

echo %PATH%>path.txt Reference http://www.computerhope.com/forum/index.php?topic=105873.0

How to set the path of a batch script as a start directory

cd /d %~dp0 Set StartInDirectory=%CD% Reference http://stackoverflow.com/questions/3827567/how-to-get-the-path-of-the-batch-script-in-windows

How to remove line break in a string using vbscript

Function LineBreak(myString) If Len(myString) <> 0 Then If Right$(myString, 2) = vbCrLf Or Right$(myString, 2) = vbNewLine Then LineBreak= Left$(myString, Len(myString) - 2) End If End If End Function Reference http://stackoverflow.com/questions/10024402/how-to-remove-line-break-in-string

How to get a index of a string using vbscript

InStr(str, " ") Reference http://stackoverflow.com/questions/25083757/how-to-get-the-index-of-a-string-after-the-first-space-in-vbsript

How to disable the maximize button of a popup window

You can do that. The action is restricted by the browser. Reference http://stackoverflow.com/questions/21304807/how-to-disable-the-maximize-button-in-window-open-popup-for-chrome