import urllib
import random

def randomMsg(tts):
    RogersS4APIKey= "APA91bGJh0o4Pc2A_J9PZtfFvZ2sWlVQRpLipVCtinac07fxRJSPbYByXEGZSh1c9AwnaxIXbY5GGeLA2eqlX_W1lwnz-JbQnFE78Khwly-ChUvaQvDbmuLT_QM6upVqufDr6ar1XxjssqNH47iGhEBdajg2f39YD9A6fdvo0L5rTJ1zeVMigFA"
    HeathersAPIKey= "Enter your API KEY here in quotes (in quotes defines it as a string in Python)"
    ttsList=tts.split("|")
    myMsg=random.choice(ttsList)
    #vc.callAction("TTS.Speak",myMsg, None)
    vc.callAction("Map.Get","WhoisTalkingtoJarvis&&who is talking to me",None)
    myLastResult=vc.getObject("LastResult","")
    if myLastResult == "roger":
	    urllib.urlopen("http://autoremotejoaomgcd.appspot.com/sendmessage?key="+RogersS4APIKey+"&message=jarvistalk=:="+myMsg)	
    if myLastResult == "heather":
        urllib.urlopen("http://autoremotejoaomgcd.appspot.com/sendmessage?key="+HeathersAPIKey+"&message=jarvistalk=:="+myMsg)
    vc.callAction("OSD.ShowText",myMsg, None) 
    #if you want to use VC, uncomment (remove #) the following line:
    #vc.callAction("Scrape","http://autoremotejoaomgcd.appspot.com/sendmessage?key="+RogersS4APIKey+"&message=jarvistalk=:="+myMsg,None) 