Results 1 to 5 of 5

Thread: 'or' in a script?

  1. #1
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default 'or' in a script?

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

    Simba Code:
    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

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    The code you posted would work just fine....


    If of course you put in actual functions

  3. #3
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

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

    Simba Code:
    if (FindDTM1 or FindDTM2 or FindDTM3) then
      Mouse();

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    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:

    Simba Code:
    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
    Working on: Tithe Farmer

  5. #5
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    oh kk i almost had it =)

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •