pyautogui--现货行情软件打开,自动下单函数

简介: pyautogui--现货行情软件打开,自动下单函数
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 17 15:08:37 2017 
@author: yunjinqi 
E-mail:yunjinqi@qq.com 
Differentiate yourself in the world from anyone else.
"""
file="C:/Program Files (x86)/绿金在线/绿金在线倚天行情交易客户端/isky.exe"
file2="C:/Program Files (x86)/绿金在线/绿金在线倚天行情交易客户端/trade/Client.exe"
def openStock(file,n):
    import pyautogui  
    import subprocess  
    import win32api 
    import time
    prs=subprocess.Popen([file])
    time.sleep(3)
    pyautogui.press('enter')
    time.sleep(5)
    pyautogui.hotkey('altleft', 'f4')
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    prs=subprocess.Popen([file])
    time.sleep(3)
    pyautogui.press('enter')
    time.sleep(5)
    screenWidth, screenHeight = pyautogui.size()
    currentMouseX, currentMouseY = pyautogui.position()
    pyautogui.moveTo(726,34)
    pyautogui.click()
    time.sleep()
def trade(comdity,direction,type0,price,amount):
    import pyautogui  
    import time  
    screenWidth, screenHeight = pyautogui.size()  
    currentMouseX, currentMouseY = pyautogui.position()  
    time.sleep(30)  
    pyautogui.moveTo(217, 369)#打开品种  
    pyautogui.click()  
    time.sleep(0.5)
    pyautogui.typewrite(comdity)
    time.sleep(0.5)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.typewrite(direction)
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.typewrite(type0)
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.typewrite(price)
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.typewrite(amount)
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
    pyautogui.press('enter')
    time.sleep(0.2)
目录
相关文章
|
Python
python的pyautogui--模拟鼠标,键盘输入实现大宗商品现货下单
python的pyautogui--模拟鼠标,键盘输入实现大宗商品现货下单
84 0
|
存储 JSON 前端开发
|
存储 JSON 前端开发
|
数据采集 供应链 机器人
Python - 抓取 iphone13 pro 线下店供货信息并发送到钉钉机器人,最后设置为定时任务
Python - 抓取 iphone13 pro 线下店供货信息并发送到钉钉机器人,最后设置为定时任务
392 0
Python - 抓取 iphone13 pro 线下店供货信息并发送到钉钉机器人,最后设置为定时任务
SAP WM中阶明明设置了TO自动产生为啥冻结物料后没有TO单据产生?
SAP WM中阶明明设置了TO自动产生为啥冻结物料后没有TO单据产生?
SAP WM中阶明明设置了TO自动产生为啥冻结物料后没有TO单据产生?
SAP RETAIL 通过自动补货功能触发的采购申请有些啥特殊的地方?
SAP RETAIL 通过自动补货功能触发的采购申请有些啥特殊的地方?
SAP RETAIL 通过自动补货功能触发的采购申请有些啥特殊的地方?
SAP 公司间STO场景中外向交货单过账后自动触发内向交货单功能的实现
SAP 公司间STO场景中外向交货单过账后自动触发内向交货单功能的实现
云支付小程序如何恢复退回蜻蜓标准版本
云支付小程序如何恢复退回蜻蜓标准版本
云支付小程序如何恢复退回蜻蜓标准版本
小程序年中报告:支付宝小程序7日留存率超微信两倍
支付宝小程序凭借平台属性和“收藏三件套”等运营工具,在留存率上遥遥领先,七日留存高达56.70%,是其他平台的两倍有余。
1174 0
小程序年中报告:支付宝小程序7日留存率超微信两倍