I am pretty sure that it wasn't working even with the code in a script, since I almost never use the python shell for such things. But it's indeed working now (apart from the code in my initial post refering to an icon that doesn't exist anymore).
Thanks!
I am pretty sure that it wasn't working even with the code in a script, since I almost never use the python shell for such things. But it's indeed working now (apart from the code in my initial post refering to an icon that doesn't exist anymore).
Thanks!