Nitro212

Untitled

Jan 29th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.37 KB | None | 0 0
  1. import time
  2. import os
  3. import random
  4.  
  5. #Funtion ad 2
  6. def ad2():
  7.     count = random.randint(60, 70) ##Segundos, Random para correr.
  8.     i = count
  9.     while True:
  10.         while i > 0:
  11.             os.system('cls')
  12.             print "Next Ad Will Run In", i
  13.             time.sleep(1)
  14.             i -= 1
  15.         os.system('cls')
  16.         #os.system(r"starta.ahk") ## Segundo ad aqui.
  17.         print "Running Second ad."
  18.         time.sleep(3)
  19.         #os.system('cls')
  20.         #i = count
  21.         time.sleep(1)
  22.         break
  23.  
  24. #Fiunction ad 1
  25. def ad1():
  26.     count = random.randint(80, 120) ##Tiempo Random, para el primer ad.
  27.     i = count
  28.     while True:
  29.         while i > 0:
  30.             os.system('cls')
  31.             print "Next Ad Will Run In", i
  32.             time.sleep(1)
  33.             i -= 1
  34.         os.system('cls')
  35.         #os.system(r"starta.ahk") ##Primer Ad aqui.
  36.         #            print "Running First ad."
  37.         time.sleep(3)
  38.         #os.system('cls')
  39.         #i = count
  40.         time.sleep(1)
  41.         break
  42.  
  43. count = random.randint(200, 230)
  44. i = 0
  45. #os.system(r"file.ahk") ##Primer ad aqui corre cuando abres el app por primera vez.
  46. print "Running First ad.."
  47. time.sleep(3)
  48. while True:
  49.     while i > 0:
  50.         os.system('cls')
  51.         print "Next Cycle In", i
  52.         time.sleep(1)
  53.         i -= 1
  54.     ad2()
  55.     ad1()
  56.     i = count
  57.     time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment