Meditech NPR Reports / NPR Report Writing / NPR Report Writer / Meditech NPR / Non-Procedural Report / Meditech Consulting / Meditech Reports Windows Scripting

Friday, November 09, 2007

Keep Windows Machine Awake (Citrix)

:KeepAwake
cd\
cls
TIME /T > "%userprofile%"\desktop\KeepAwakeLog.txt
TYPE "%userprofile%"\desktop\KeepAwakeLog.txt
SLEEP 60
start cmd /c "sleep 1 & exit"
@GoTo :KeepAwake

Thursday, May 31, 2007

Batch File: Clear Desktop (WinNT.X)

:: Get to your system drive, I've hardcoded c:.
c:
:: Change directories to your desktop.
cd "%userprofile%"\desktop\
:: Create a directory to store stuff for later.
mkdir "%userprofile%"\desktop\ReviewCullDesktop\
:: Move all files to this folder.
move /y *.* "%userprofile%"\desktop\ReviewCullDesktop\
:: Change over to this destination folder and put your shortcuts back.
cd "%userprofile%"\desktop\ReviewCullDesktop\
move /y *.rdp "%userprofile%"\desktop\
move /y *.lnk "%userprofile%"\desktop\

Thursday, May 24, 2007

VB Law

http://www.visibleprogress.com/screenshot_ws.htm

Wednesday, May 23, 2007

Batch: Hack to change file extension.

for %f IN (*.tmp) DO echo. f|xcopy %f %f.txt & del %f

Tuesday, May 15, 2007

VB6 Contains - InStr

Quick and easy VB6 way to determine whether the string ERX is in the strInBuffer.

If InStr(strInBuffer, "ERX") <> 0 Then
strMessage = ""
End If

Monday, May 14, 2007

VB6 Hang or Pause for X Seconds

Private Sub Hang(sngSeconds As Single)
Dim sngTimeOut As Single
sngTimeOut = Timer + sngSeconds
DoEvents
Do Until Timer >= sngTimeOut
Loop
End Sub

VB6 Compile Name

The name of the executable is located in the .vbp project file.

ExeName32="in.exe"

Saturday, May 12, 2007

VB6 Map Drive - Format File Name

strFtpFileName = Left(pData.cFileName, InStr(1, pData.cFileName, String(1, 0), vbBinaryCompare) - 1)

Monday, April 09, 2007

VB6 Functions - Return Value

Function GetData(strData As String) As String

GetData = strData

End Function

Set the name of the function equal to the data you want to pass back.

VB6 For Loop to UBound

For lngLoop = 0 To (UBound(strHL7Message()) - 1) 'Loop thru segments.
' To avoid subscript errors and crashing;
' you only loop to Ubound of structure - 1.
Next 'End loop thru segments.

Meditech NPR Reports / NPR Report Writing / NPR Report Writer / Meditech NPR / Non-Procedural Report / Meditech Consulting / Meditech Reports