Page 1 of 1

Current Card

Posted: Sat Feb 27, 2016 4:55 pm
by A1Qicks
Probably something simple in the dictionary - but if I knew where to look I'd already have the answer.

If I have a script in the stack and I want it to act differently depending on what the current front card is, how do I do this?

So a message comes in from a socket, and the stack reads the message, and if it's on "Card 1" it'll send it to to "Field 1" and if it's on "Card 2" it'll ignore it.

Re: Current Card

Posted: Sat Feb 27, 2016 5:14 pm
by quailcreek
You can use the ID of this or the short name of this cd to suit your needs.

Code: Select all

on preOpenStack
   runMe
end preOpenStack

on runMe
   switch the short name of this cd
      case "Fred"
         -- do the stuff related to this cd
         break
         
      case "Wilma"
         -- do the stuff related to this cd
         break
   end switch
end runMe

Re: Current Card

Posted: Sat Feb 27, 2016 5:40 pm
by A1Qicks
Perfect. Thanks!