OK.
The file links are all internal so they need to be updated for your environment. Passwords also. I will post the raw code where you can download it.
http://svhealthcare.net/media/MT-L/EDM_Tracker_Launcher.zip
There it is, use it freely modify whatever. Again you will need to download the Autoit compiler.
Charles J. Still, MBA
Southwestern Vermont Health Care
St...@phin.org
================================================================================
Meditech RAD EDM Tracker Auto Login Utility and Notes - RADLT-r1.exe and RADLT-r1-Wrapper.exe
Two programs have been written to support the auto launch of the RAD EDM Read only Tracker.
RADLT-r1.exe
RADLT-r1-Wrapper.exe <-- Run in startup.
They are located herre:
file://issvhc/sharedir/IS/Meditech_EDM
To install to a workstation copy the two files to the
C:\Program Files\MEDITECH\Workstation4.x
and create a shortcut to the RADLT-r1-Wrapper.exe file in the computers SVMC auto start directory.
The program runs every 5 minutes and if the PC is idle, and the application is not running, it auto logsin and starts the tracker.
The *.AU3 files are also in the file://issvhc/sharedir/IS/Meditech_EDM directory.
=========================================================================
The SHARED INI file can be used to manage all trackers.
file://issvhc/ShareDir/EDCannedText/EDMTracker/RADLT.ini
[Version]
VersionCurrent="RADLT-r1.exe"
VersionOld="EDMLT-r7.exe"
[Location]
Source="\\issvhc\ShareDir\EDCannedText\EDMTracker\"
Destination="C:\Program Files\MEDITECH\Workstation4.x\"
[Status]
;Note Run, Disabled, Kill <- Changing this line can Disable or EXIT the application on all workstations entirely.
Status1="Run"
=========================================================================
=========================================================================
Code Below RADLT-r1-Wrapper.exe
=========================================================================
Code for Wrapper Application
;' This script wrapps the MEDITCH EDM RAD Tracker Application and runs it every 5 minutes
;' It will restart the program if it is closed, Maximize if minimized, If the pc is idle,
;' Charles Still, 2012 - 2013
;' Added Move Mouse for Screensaver Disable 1/11/13
#include <Timers.au3>
#include <_CompareFileTimeEx.au3>
DIM $switch=1
DIM $IniFile="\\issvhc\ShareDir\EDCannedText\EDMTracker\RADLT.ini"
DIM $version=IniRead($IniFile,"Version","VersionCurrent","NotFound")
DIM $hSource=IniRead($IniFile,"Location","Source","NotFound") & $version
DIM $hDestination=IniRead($IniFile,"Location","Destination","NotFound") & $version
DIM $Status=IniRead("\\issvhc\ShareDir\EDCannedText\EDMTracker\RADLT.ini ")
DIM $iMethod=0
DIM $FileCompare=0
DIM $wtf=0 ;Debug Util
sleep(50000) ;50 Second Sleep Delay befor running script for fitst time should help with slow booting computers
While 1
;Disables screen saver with mouse move every 4 min if device is idle
Global $iIdleTime = _Timer_GetIdleTime()
If $iIdleTime > 240000 Then
MouseMove(10, 100, 0)
EndIf
IF Mod(@MIN,5) = 0 Then
If FileExists($hDestination)=0 Then FileCopy ($hSource, $hDestination, 1)
If FileExists($IniFile)=0 Then
MsgBox("Error","Inifile not found at" & $IniFile, 5)
Exit
EndIf
Global $FileCompare = _CompareFileTimeEx($hSource, $hDestination, $iMethod)
If $FileCompare=1 then FileCopy ($hSource, $hDestination, 1)
If $switch = 0 and $Status="Run" Then
Run($hDestination)
$switch=1
Else
$switch=0
EndIf
Endif
;EndIf
Sleep(10000)
WEnd
=======================================================================
Code for RADLT-r1.exe
=======================================================================
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;'
;' SVMC Tracker Board Script (Via Auto-It!)
;'
;' Written by Damian Shepard in IT NAMC, to assist with automatically logging into
;' the ED Tracker board in the Emergency Room for our EDM Module Go-LIVE
;' - 6/2012 - updated by Charles Still SVMC
;' - Includes exits if a step in the macro fails
;' - Includes stop if Meditech is Already Running
;' - Includes stop if Script is already executing
;' - Includes Maximize Window on launch
;' - Added functionality to handle Login Messages displaying on screen
;' - 12/2012 Added idle timer so script will not run if device has been used in last 30 seconds
;' - 1/2013 Rewritten from scratch to handle multiple startup options
;' - 1/2013 Added feature to maximize window of tracker if it is minimized
;' - Note the EDMLT-r#-Wrapper or RADLT-r# application calls this script every 5 min.
;' - version RADLT-r1 - revision 1 - 1/25/13
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;' Start of Script
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim $Test=0
Dim $numberOfAppInstances=0
Dim $FAIL=0
Dim $FAIL1=0
DIM $FAIL2=0
Dim $ProcessName = "T.exe"
Dim $Y=0
Dim $state=0
Opt("WinTitleMatchMode", 2)
#include <Process.au3>
#include <Timers.au3>
$numberOfAppInstances = ProcessList(_ProcessGetName(@AutoItPID))
$numberOfAppInstances = $numberOfAppInstances[0][0]
Global $iIdleTime = _Timer_GetIdleTime()
;MsgBox(64, "_Timer_GetIdleTime", "Idle time = " & $iIdleTime & "ms")
;'Checks idle time delay, and does not run if computer has been used in last 30 sec.
;To use this script as an autolauncher shortcut, remark it out with ;'s
If $iIdleTime < 30000 Then
Exit
EndIf
$state = WinGetState("Radiology Tracker") ;gets the state of your ticker window
If BitAnd($state, 16) Then ;if it's minimized
WinSetState("Radiology Tracker","",@SW_RESTORE) ;restore it
EndIf
If $numberOfAppInstances > 1 Then
Exit
EndIf
If ProcessExists($ProcessName) Then
Exit
EndIf
;' Run("C:\Program Files\MEDITECH\Workstation4.x\T.exe")
Run("C:\Program Files\MEDITECH\Workstation4.x\T.exe", "" , @SW_MAXIMIZE)
Do
$FAIL1 = WinWaitActive("[CLASS:MRWF]","Sign On",2)
$FAIL2 = WinWaitActive("[TITLE:Magic Workstation]","MIS Directories",2)
If $FAIL1 = 0 AND $FAIL2 = 0 Then
Send("{ENTER}")
$Y=$Y+1
EndIf
If $FAIL1 <> 0 Then
Send("radtracker{ENTER}")
Send("password{ENTER}")
Sleep(200)
Send("{ENTER}")
Exit
EndIf
If $FAIL2 <> 0 THEN
Send("1{ENTER}")
Sleep(100)
Send("radtracker{ENTER}")
Send("password{ENTER}")
Sleep(200)
Send("{ENTER}")
Exit
EndIf
Until $Y=4
Exit
DISCLAIMER: The information contained in this electronic message is
legally privileged and confidential under applicable law and is intended
for a particular addressee(s). If it is not clear that you are the intended
recipient, you are hereby notified that you have received this transmittal
in error; any review, copying or distribution or dissemination is strictly
prohibited. If you suspect that you have received this transmittal in
error, please notify Southwestern VT Health Care Corporation
immediately by return email reply to (
help...@phin.org), and
immediately delete the transmittal and any attachments without making
any copy or distribution. Thank you.