Except now it is running over and over again. I'm know this is probably a dumb question and I'm sorry for asking, but how do I get that function to stop running. I've got it looking at a global variable, but it runs over and over anyways.
function vlc()
checkiftrue=1
math.randomseed(os.time())
math.random(); math.random(); math.random()
randomNumber = math.random(1,3)
print(randomNumber)
if randomNumber==1 then
os.execute [[""C:\\Program Files\\VideoLan\\VLC\\vlc.exe" "https://www.youtube.com/watch?v=_g2qU2pSzTY" "https://www.youtube.com/watch?v=OAUUrM87jg8" "--fullscreen" "--no-qt-fs-controller" "--qt-start-minimized" "--qt-fullscreen-screennumber=2" "--no-video-title-show" "vlc://quit""]]
elseif randomNumber==2 then
os.execute [[""C:\\Program Files\\VideoLan\\VLC\\vlc.exe" "https://www.youtube.com/watch?v=_g2qU2pSzTY" "https://www.youtube.com/watch?v=xFnTXoKeWIE" "--fullscreen" "--no-qt-fs-controller" "--qt-start-minimized" "--qt-fullscreen-screennumber=2" "--no-video-title-show" "vlc://quit""]]
elseif randomNumber==3 then
os.execute [[""C:\\Program Files\\VideoLan\\VLC\\vlc.exe" "https://www.youtube.com/watch?v=_g2qU2pSzTY" "https://www.youtube.com/watch?v=sTm1I5lBDrA" "--fullscreen" "--no-qt-fs-controller" "--qt-start-minimized" "--qt-fullscreen-screennumber=2" "--no-video-title-show" "vlc://quit""]]
end
return
end
function checkPushback()
if checkiftrue==0 then
event.control(66483,"vlc")
return
end
end
checkiftrue=0
checkPushback()