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
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
Set system screen off Set system screen off as never adb shell settings put system screen_off_timeout -1 Set system screen off as 15 seconds adb shell settings put system screen_off_timeout -1 | 15000 Reference : http://developer.android.com/reference/android/provider/Settings.System.html#SCREEN_OFF_TIMEOUT Start music player Open google play music adb shell am start -n com.google.android.music/com.android.music.activitymanagement.TopLevelActivity Reference : http://developer.android.com/reference/android/provider/Settings.System.html#SCREEN_BRIGHTNESS Set system screen brightness Set screen backlight as 200 adb shell settings put system screen_brightness 200 Reference : http://developer.android.com/reference/android/provider/Settings.System.html#SCREEN_BRIGHTNESS
Comments
Post a Comment