If there is a way of doing it, it is hugely restricted and so there is no way of us finding out unless we work it out for ourselves.
But this can be quite a difficult task as slots machines have been massively developed into what they are now in order to prevent people playing for free as this is very illegal.
- Previous techniques
But now it'll most likely keep your coin or just make no effect as the machines are now usually able to detect the strings. There are very few machines where this trick will work now.
There is also the 'shaved coin' method. Some people realized that if you shaved about 0.040" off a quarter, the slot machine would detect the coin and shoot it back out, so you get similar results to the string and coin method but without a piece of string hanging out of the machine.
But again, slot machines now rule out the coins, which don't measure up to the size of the coin required and so this trick no longer works either.
There are other methods to get free slot play and many were used when slot machines were not so highly developed.
However, many, if not all, of these tricks will no longer work due to the great development of the sophisticated designs of newer slot machines.