def urlCopy():
py.moveTo(x=420,y=11,duration=2)
py.click()
#share
py.moveTo(x=1054,y=946,duration=2)
py.click()
#copy
py.moveTo(x=1175,y=630,duration=2)
py.click()
#1st tab
py.moveTo(x=252,y=16,duration=2)
py.click()
py.moveTo(x=1093, y=517)
py.click()
if scrol == True:
py.moveTo(x=154, y=420,duration=2)
py.tripleClick()
py.moveTo(x=154, y=420,duration=2)
py.tripleClick()
varrs = py.hotkey('ctrl','v')
global scrol
scrol = False
else:
py.scroll(-300)
py.tripleClick()
py.moveTo(x=154, y=420,duration=2)
py.tripleClick()
varrs = py.hotkey('ctrl','v')
I am trying to copy youtube videos title and save it in other website.I want the code to run without scrolling at first loop and then always scrolling with next loops.I am going to loop this function again and again.