but here is the main function where it saves data and exits....
now what i want to do is to search from the existing excel file and save
my mine keeps looping, so i removed it again
Code: Select all
kyjeal:=2
CoordMode,mouse, screen
SetMouseDelay, 0
SetControlDelay, 0
fileselectfile, path,,,Where Will I save your Assay??,
mainfunction:
InputBox, q1,Copper,,,100,100,892,953
InputBox, q2,Gold,,,100,100,892,953
if (q1="") and (q2="")
{
MsgBox, 0,,DATA not SAVED!
}
else
{
oWorkBook := ComObjGet(path)
oWorkbook.Application.Windows(oWorkbook.Name).Visible := 1
oWorkbook.Worksheets("ScoRm").Range("A"kyjeal).Value := t1
oWorkbook.Worksheets("ScoRm").Range("B"kyjeal).Value := t2
oWorkbook.Worksheets("ScoRm").Range("C"kyjeal).Value := q1
oWorkbook.Worksheets("ScoRm").Range("D"kyjeal).Value := Round((q2*31.104),2)
oWorkbook.Worksheets("ScoRm").Range("E"kyjeal).Value := q3
oWorkbook.Close(1)
oWorkBook := "", oSheet := ""
kyjeal:=kyjeal+1
}
Return