0

If statement Not correctly working in pyautogui project not able to get output as required if i click 'y' in the cmd i will get"Not Mentioned" but if i enter 'n' in the cmd i will get nothing or it will type the same "Not Mentioned". I am trying but not able to solve the problem. Trying to do automation for data entry job in python

import pyautogui


#Company Code
pyautogui.click(x=1061, y=362)
pyautogui.write("<B>Not Mentioned<B>")

#Company Name
pyautogui.click(x=1047, y=395)
pyautogui.write("<U><U>")

#Sedol
print("Press y/Y for <B>Not Mentioned<B> and n/N for None")
in_1 = input("Press y/Y for <B>Not Mentioned<B> and n/N for None:")
if in_1 == 'y' or 'Y':
    pyautogui.click(x=1049, y=646)
    pyautogui.write("<B>Not Mentioned<B>")
elif in_1 == 'n' or 'N':
    pyautogui.click(x=1049, y=646)
    pyautogui.write("0")

#Website<U><U>
pyautogui.click(x=1050, y=714)
pyautogui.write("<I>www.<U>")

#Market Turnover
pyautogui.click(x=1044, y=745)
pyautogui.write("<B>Not Mentioned<B>")

#Section2
pyautogui.click(x=973, y=264)
pyautogui.write("<B>Not Mentioned<B>")

#Boardlot
pyautogui.click(x=1087, y=320)
pyautogui.write("<B>Not Mentioned<B>")

#Classification
pyautogui.click(x=1087, y=358)
pyautogui.write("<B><U>")

#Fund name
pyautogui.click(x=1090, y=391)
pyautogui.write("<I><U>")

#Authorised Shares
pyautogui.click(x=1091, y=425)
pyautogui.write("<R><B>")

#Market Capital
pyautogui.click(x=1088, y=455)
pyautogui.write("<R><R>")

#Place of Share Register
pyautogui.click(x=1089, y=487)
pyautogui.write("<B>Not Mentioned<B>")

#Company Profile

#Negotiator
pyautogui.click(x=1088, y=555)
pyautogui.write("<B>Not Mentioned<B>")

#No of Employee's
pyautogui.click(x=1087, y=623)
pyautogui.write("/Employee's Union Association")

#Section3
pyautogui.click(x=1037, y=271)

#Chairman

#Issued Shares
pyautogui.click(x=1052, y=386)
pyautogui.write("<R><R>")

#Sub Classification
pyautogui.click(x=1050, y=452)
pyautogui.write("<B><U>")

#Trading Pattern
pyautogui.click(x=1049, y=485)
pyautogui.write("<B>Not Mentioned<B>")

#PE ratio

#Councellor
pyautogui.click(x=1049, y=553)
pyautogui.write("<B>Not Mentioned<B>")

#ISD Status
pyautogui.click(x=1052, y=582)
pyautogui.write("<B>Not Mentioned<B>")


#Consultant
pyautogui.click(x=1051, y=615)
pyautogui.write("<B>Not Mentioned<B>")

0 Answers0