
- #Insult order how to save software#
- #Insult order how to save code#
- #Insult order how to save download#
#Insult order how to save code#
TIM is aimed at the Windows platform, but with a few subtle changes the source code could be made to work on Linux and Mac. Fixed Google API change, old versions of TIM before V1.36 may not work properly now. It’s still very badly coded, but I self-flagellated in front of a cross for an hour for my coding sins just so that I could release it to the gen pub, (that’s you dudes!). Update: TIM V1.36 Python source is now available. I want to take my time and learn about these issues first, as I like all my code to be rated 10 in Pylint where possible. My code is bad enough without adding the extra insult of not being PEP8 compliant. For these reasons I am holding back on publishing the source code for now. I have a load of tricky variables that I have to change, try-except blocks to improve, and a global variable. I also dropped in my standard drop-down menu containing, “ About”, “Quit”, “help”, and “ Visit Blog”. So the GUI was a cinch to build really, there was still plenty to do under the hood to hook up all the parts together, but I managed all that in a few hours. I also used WAC to create the check buttons and the right click menu. You may have noticed that the GUI looks a bit familiar? That’s because it is the one I used in my NewsBox project. This may not show up on slower systems so much, but on a fairly powerful processor with decent memory, you may stumble across this ‘feature’. I have tried disabling the Insult button, but it does no good as the clicks of the mouse get queued up, and as soon as I re-activate the button they all try to execute at the same time :-).
#Insult order how to save software#
TIM uses whatever software you have associated with MP3’s to play them.
#Insult order how to save download#
The three seconds it takes to play the mp3 is calculable, and I have a three second pause for that, but I can’t account for the variable time it takes to contact Google and download the mp3.

Once the command to Google Translate has left TIM, the GUI has no way of knowing what is happening outside of it and so just carries on thinking its task is completed. Should the user click crazily on the insult button with “ Hear Insult” selected, things can get very messy. There is a bug in TIM here that I simply cannot resolve at the moment. To view the MP3’s you have saved, click on the orange “MP3s” button. If you want to retain a copy of the mp3, just tick “ Save Mp3“. Unfortunately only the one voice is available, and it’s not perfect, but it’s acceptable for a freebie I suppose. If you tick “hear insult” then TIM uses Google translate to covert the text to speech for the next insult generated. It was super simple to merge into my code and adds a dimension to what is, after all, a pretty shallow program!īy default, the generated insult just appears in the listbox. To achieve this I used the code from my Newb Code Snippets Collection, number 13. Clicking this will copy the selected insult to a file called “ my_fav_insults.txt“, which can be accessed by clicking the red “Favs” button. The insult will be copied to your clipboard for pasting anywhere you like.Īlso in the right click menu you will find “ Save as a Fav Insult“. If you want to grab a certain insult directly from the listbox to mail to your Mum or whatever, then click on the insult to select it, and then right click the mouse and select “copy”. You can delete the saved_insults.txtfile, and TIM will just create a fresh one and start collecting again.

Ironically, some of the funniest ones make no sense at all though! Not all of the insults make sense, I’m working on that. If TIM does not find the text files he insults you, and then directs you to the shared folder in my Dropbox, where you can download fresh copies of the files. Remember that the insult text files need to reside in the same directory that the program is run from. If they are too much for you, just edit out the offending words, and re-save the text file. I have put all the really nasty, grade 1 swear words in the lists as default.

I have also decided to stop faffing about. I decided to keep the files separate, and in standard text, so that the user can join in the fun of adding or removing their favourite words. It can be quite time consuming finding words that work and making sure it is not already used in the other word files, to that end, the lists are now in alphabetical order. I need to get some more words in insult-2, 3 and 5 but they are now becoming harder to find. I will be adding and removing words all of the time that I am working on, or using, the program. In this updated version, I have added more words to the lists, currently:Īccording to my calculations that should give us billions of combinations, enough for at least one insult per person on the planet, and Mars too!
