QT Effects

Yennie at aol.com Yennie at aol.com
Wed Apr 3 14:36:00 EST 2002


<< If you figure out how to use this with specialized parameters, that'd be
great too. I'd much rather use your brain than mine. :) >>

Well here's a start, pending some investigation:

This first one will find all the 4-char codes buried in there. Try choosing 
an effect without changing any parameters, and compare what you get with the 
results when you change one. The result-> a char code appears in there 
somewhere.

on mouseUp
  answer effect
  put it into theEffect
  repeat with i=1 to length(theEffect)
    put char 1 to 4 of base64Decode(char i to (i+7) of theEffect) into 
maybeSomething
    put TRUE into keepIt
    repeat for each char x in maybeSomething
      if (x is in 
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!") then
        
      else
        put FALSE into keepIt
        exit repeat
      end if
    end repeat
    if (keepIt = TRUE) and (length(maybeSomething) = 4) then
      answer ("offset:"&i)&cr&maybeSomething
    end if
  end repeat
end mouseUp

This one will find the difference areas between two effect descriptions- this 
nails down about where you can find the actual parameter values. This is 
useful if you choose the same effect twice with the same parameters, but 
choose two different values. Presumably you could swap the changing values 
into this area of the description.

on mouseUp
  answer effect
  put it into effect1
  answer effect
  put it into effect2
  put 0 into startChar
  repeat with i=1 to max(length(effect1), length(effect2))
    if (char i of effect1 <> char i of effect2) then
      if (startChar = 0) then
        put i into startChar
      end if
    else
      if (startChar > 0) then
        answer ("char"&&startChar&&"to"&&(i-1))
        put 0 into startChar
      end if
    end if
  end repeat
  answer effect1&cr&cr&effect2
end mouseUp


HTH,
Brian



More information about the metacard mailing list