Would someone please show me how to modify the script below so the value of "n" in the while (i < n) loop and the integer value "dvRef" can be passed as parameters?

public object Main(object[] Parms)

{

int i = 0;

//int dvRef = hs.GetDeviceRefByName("Living Room Lamp");

do

{

hs.CAPIControlHandler(hs.CAPIGetSingleControl(

hs.WaitSecs(1.5);

hs.CAPIControlHandler(hs.CAPIGetSingleControl(

i++;

}

while (i <

return(0);

Any help would be greatly appreciated. Thanks in advance!

public object Main(object[] Parms)

{

int i = 0;

//int dvRef = hs.GetDeviceRefByName("Living Room Lamp");

do

{

hs.CAPIControlHandler(hs.CAPIGetSingleControl(

**dvRef,**false, "On", false, false));hs.WaitSecs(1.5);

hs.CAPIControlHandler(hs.CAPIGetSingleControl(

**dvRef**, false, "Off", false, false));i++;

}

while (i <

**n**);return(0);

Any help would be greatly appreciated. Thanks in advance!

## Comment