我是靠谱客的博主 贪玩羽毛,这篇文章主要介绍pyautogui的简单操作(2)-弹窗操作,现在分享给大家,希望可以做个参考。

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pyautogui as pg b = pg.alert(text='hahh',title='test',button='ok') #显示一个弹窗 print(b)#点击弹窗后返回button名 b1 = pg.confirm(text='testing',title='HAHHH',buttons=['ok','cancel'])#显示一个确认窗口 print(b1)#获取点击的值,如果'x'掉了窗口,则返回none ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200508143239192.png) '''消息弹窗可以输入文字''' b2 = pg.prompt(text='testing',title='HAHHH',default='') print(b2) ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200508144030502.png) b3 = pg.prompt(text='testing',title='HAHHH',default='dd') print(b3) ![在这里插入图片描述](https://img-blog.csdnimg.cn/2020050814404787.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDUxNzg5MQ==,size_16,color_FFFFFF,t_70) '''密码框''' b4 = pg.password(text='testing',title='HAHHH',default='',mask='')#可以输入密码的密码框,密码框明文显示 b5 = pg.password(text='testing',title='HAHHH',default='',mask='*')#可以输入密码的密码框,密码框*显示 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200508144623773.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDUxNzg5MQ==,size_16,color_FFFFFF,t_70)

最后

以上就是贪玩羽毛最近收集整理的关于pyautogui的简单操作(2)-弹窗操作的全部内容,更多相关pyautogui内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部