Post by miro on Apr 20, 2023 12:27:51 GMT
Hi Everyone,
in case you are suffering from Windows restarting at night etc. I have created a tiny python script to start and login to Ipposnif automatically. I did not go through setting up the standard programing like main functions and configuration files, because IMO the simpler the better.
Prerequisites:
- Python3 installed on your VPS or local pc
- pywinauto python module installed. In cmd.exe: pip install pywinauto
Substitute your credentials in YourLoginName and YourPassworrd and save as a file ie.: ippo_start.py
##################
import time
from pywinauto import Application
app = Application().start(r"C:\Program Files (x86)\Ipposnif\ipposnif.exe")
app = None
time.sleep(20)
app = Application().connect(path=r"C:\Program Files (x86)\Ipposnif\ipposnif.exe")
wins = app.windows()
bf_win = app.window(title_re=".*Betfair*.")
bf_win.print_control_identifiers()
bf_win.Edit.click()
bf_win.Edit.type_keys('YourLoginName')
bf_win.Edit2.click()
bf_win.Edit2.type_keys('YourPassword')
bf_win.LoginButton.click()
##################
Create a windows batch file that will start the python script. In my case:
file name: ippo.bat
file content:
C:\Users\Miro\Desktop\ippo_start.py
Once you have the above ready, open Task Scheduler from Windows start menu and create a new task.
1) Create Task
2) General Tab> Name: ippo_start (or whatever you like), Security Options: Run only when user is logged on
3) Triggers Tab> New> Begin the task: At startup, Advanced Settings: Delay task for: 5 minutes (5 minutes works fine for me) and click OK
4) Actions Tab> New> Action: Start a program
- Settings> Program/script field enter following: cmd
- Add arguments field: /k "C:\Users\Miro\Desktop\ippo.bat" << please adjust the path to your windows batch file
- Confirm all by OK
5) restart your machine to test if the solution is working for you
Should you run into trouble or have some questions, let me know.
BR,
Miro
PS.: if not getting required results, try to increase wait time in seconds in the python file - time.sleep(20), or the delay time in the scheduled windows task
in case you are suffering from Windows restarting at night etc. I have created a tiny python script to start and login to Ipposnif automatically. I did not go through setting up the standard programing like main functions and configuration files, because IMO the simpler the better.
Prerequisites:
- Python3 installed on your VPS or local pc
- pywinauto python module installed. In cmd.exe: pip install pywinauto
Substitute your credentials in YourLoginName and YourPassworrd and save as a file ie.: ippo_start.py
##################
import time
from pywinauto import Application
app = Application().start(r"C:\Program Files (x86)\Ipposnif\ipposnif.exe")
app = None
time.sleep(20)
app = Application().connect(path=r"C:\Program Files (x86)\Ipposnif\ipposnif.exe")
wins = app.windows()
bf_win = app.window(title_re=".*Betfair*.")
bf_win.print_control_identifiers()
bf_win.Edit.click()
bf_win.Edit.type_keys('YourLoginName')
bf_win.Edit2.click()
bf_win.Edit2.type_keys('YourPassword')
bf_win.LoginButton.click()
##################
Create a windows batch file that will start the python script. In my case:
file name: ippo.bat
file content:
C:\Users\Miro\Desktop\ippo_start.py
Once you have the above ready, open Task Scheduler from Windows start menu and create a new task.
1) Create Task
2) General Tab> Name: ippo_start (or whatever you like), Security Options: Run only when user is logged on
3) Triggers Tab> New> Begin the task: At startup, Advanced Settings: Delay task for: 5 minutes (5 minutes works fine for me) and click OK
4) Actions Tab> New> Action: Start a program
- Settings> Program/script field enter following: cmd
- Add arguments field: /k "C:\Users\Miro\Desktop\ippo.bat" << please adjust the path to your windows batch file
- Confirm all by OK
5) restart your machine to test if the solution is working for you
Should you run into trouble or have some questions, let me know.
BR,
Miro
PS.: if not getting required results, try to increase wait time in seconds in the python file - time.sleep(20), or the delay time in the scheduled windows task