Last active
April 28, 2023 10:08
-
-
Save jvdi/d2f64fb66765de953d2718adbc649a12 to your computer and use it in GitHub Desktop.
A robot for change a combo box(Default Pos) in RahkarPOS app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from dotenv import load_dotenv | |
from pywinauto.application import Application | |
load_dotenv() | |
flag = True | |
while(True): | |
if flag: | |
try: | |
app = Application().connect(title="تسویه فاکتور") | |
window = app.WindowsForms10Window8app0141b42a_r7_ad1 | |
window.ComboBox0.select(int(os.getenv('DEFAULT_POS'))) | |
flag = False | |
except: | |
pass | |
else: | |
try: | |
app = Application().connect(title="تسویه فاکتور") | |
except: | |
flag = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment