Code: Select all
#s::
xl := ComObjActive("Excel.Application")
cellvalue :=xl.activecell.value
loop, 10
{
if (cellvalue = 2)
{
Sleep, 500
Send, {Enter}
Sleep, 500
}
else
{
Send, 2
Sleep, 500
Send, {Enter}
}
}
msgbox, end of loop
Return
Code: Select all
#s::
xl := ComObjActive("Excel.Application")
cellvalue :=xl.activecell.value
loop, 10
{
if (cellvalue = 2)
{
Sleep, 500
Send, {Enter}
Sleep, 500
}
else
{
Send, 2
Sleep, 500
Send, {Enter}
}
}
msgbox, end of loop
Return
Code: Select all
#s::
xl := ComObjActive("Excel.Application")
loop, 10
{
cellvalue :=xl.activecell.value
if (cellvalue = 2)
xl.ActiveCell.Offset(1,0).Select ; Move Down
else
{
xl.activecell.value := 2 ; Change number "2"
xl.ActiveCell.Offset(1,0).Select ; Move Down
}
}
msgbox, end of loop
return