Hi guys.
im trying to do a list box. which shows the 3 timing that has been taken and also the average.
I cant seem to load all 3 values into the list.
Only 1 value goes in. When i click on the script again, it
Code:
SetWorkingDir %A_ScriptDir%
-----Stopwatch Start------------
Run Communicator
Loop
{
IfWinExist Microsoft Office Communicator
{
WinActivate
StartTime := A_TickCount
Run %A_ScriptDir%\off communicator.bat
break
}
Else
{
SoundBeep 0, 0 ; used to let the loop re-run.
}
}
-------StopWatch End-------------------
Loop
{
ImageSearch, Action1, Action2, 0, 0, A_ScreenHeight, %A_ScriptDir%\communicator.bmp
if ErrorLevel = 2
{
Msgbox, communicator.bmp cant be found
}
else if ErrorLevel = 1
{
Soundbeep 0, 0
}
else
{
ElapsedTime := (A_TickCount - StartTime)/1000 ;
Rounded := Round(ElapsedTime,2)
break
}
}
Gui, Add, ListView, r3 w300 MyListView, First Try|Second Try|Third Try|Average
Gui +Resize
Gui, font, s12
Gui, show, x0 y0, timelist
GuiControl, -Redraw, MyListView ; disable redraw
LV_Add(A_index, +Integer Rounded) ; A_index was added to supposedly used to determine the column number that i wish to put the new value)
GuiControl, +Redraw, MyListView
LV_ModifyCol() ; Auto-size each column to fit its contents.
Return
GuiEscape:
GuiClose:
Gui, Destroy
ExitApp