Skip to content

Instantly share code, notes, and snippets.

@jvdi
Last active April 28, 2023 10:08
Show Gist options
  • Save jvdi/d2f64fb66765de953d2718adbc649a12 to your computer and use it in GitHub Desktop.
Save jvdi/d2f64fb66765de953d2718adbc649a12 to your computer and use it in GitHub Desktop.
A robot for change a combo box(Default Pos) in RahkarPOS app
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