Loadbang only on first open of patcher

Zach Braswell's icon

Hey guys

So I'm using a Max external object called MachineID to devise a simple copy protection scheme inside my application I've made using Max. Basically, Machine ID grabs the computers serial number and displays it in a message box.

So what I'm trying to do is...... pull up the serial number with a loadbang the first time the app is used for the first time, and then have that serial number permanently attached to the app. So if someone wants to email my app to a friend, it won't open.

The question is, is it possible to have a loadbang only perform a bang the FIRST TIME the app is opened?

Thanks!

tyler mazaika's icon

Hi Zach, I've never tried copy-protection with my Max/M4L patches yet, but I would think that, no, you can't make [loadbang] only fire the first time, but you could gate it's output based on some other conditions. For instance, when you [loadbang], you first look on disk to see if you've written a cookie file somewhere saying "authorized" or whatever, and if not then you let a bang through to the MachineID object.

I'd be interested to here more expert opinions on this, though.

Cheers,
Tyler

Zach Braswell's icon

Thanks for your input Tyler,

I actually kinda answered my own question immediately after typing this out. If you're interested, this is the solution I found that is really similar to what you had proposed:

First time app opens, loadbang goes into gate which opens a patcher that will grab the computers serial number and saves it into the app. Once that function is done, it will change the output of the gate from 1 to 2. And of course, 2 would be the main patch. So now each time the app is opened, the loadbang will open the main patcher, but also test the current computers serial number to see if it will match the one saved in the patch. This will keep it from being able to be used on multiple computers.

You may never need this info but open source rulzzzzzz amiright?