SRL Archive - OSR Help

'or' in a script?


ogustuce

2012-03-21 17:50:42

how do i use 'or' in a script? how can i write something like that in a script?


if find dtm1 or dtm2 or dtm3 or dtm4 then
begin
use something on the found dtm <- (dtm1 or dtm2 or dtm3 or dtm4)
end;

thanks

Abu

2012-03-21 17:52:59

The code you posted would work just fine….


If of course you put in actual functions

Nebula

2012-03-21 17:53:22

that would work (If you are using it how I think you are trying to use it)


if (FindDTM1 or FindDTM2 or FindDTM3) then
Mouse();



masterBB

2012-03-21 17:56:09

if findDTM(dtm1) or findDTM(dtm2) or findDTM(dtm3) or findDTM(dtm4) then
begin
use something on the found dtm <- (dtm1 or dtm2 or dtm3 or dtm4)
end;

But I suggest:

setLength(dtms,4);
dtms[0] := DtmFromString('0a3290g3g5');
dtms[1] := DtmFromString('0a3290g3g5');
dtms[2] := DtmFromString('0a3290g3g5');
dtms[3] := DtmFromString('0a3290g3g5');

for i := 0 to High(dtms) do
if(findDTM(dtms[i])) then
// your code

ogustuce

2012-03-21 17:58:06

oh kk i almost had it =)

thanks