找回密码
 加入
搜索
查看: 3515|回复: 5

[原创] 读书笔记:简易英文阅读器

  [复制链接]
发表于 2012-4-14 21:21:46 | 显示全部楼层 |阅读模式
本帖最后由 wbwchina 于 2012-4-14 21:28 编辑

根据虫子樱桃大师的《AU3爱好者联盟AU3入门教程 完整版[2月9日添加书签版]》
(链接地址:http://www.autoitx.com/thread-18836-1-1.html)中的“简易英文阅读器”部分改写,做一下学习笔记。望大家多多指教!
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Dim $nr
$Form1 = GUICreate("简易英文阅读器", 409, 223, 192, 114)
$edit=GUICtrlCreateEdit("", 16, 16, 305, 137)
$Button1 = GUICtrlCreateButton("开始阅读", 40, 168, 235, 25)
$Button2 = GUICtrlCreateButton("退出", 304, 168, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
     $tnr=GUICtrlRead($edit)
         $Voice = ObjCreate("Sapi.SpVoice")
If $tnr=""Then
   $Voice.Speak ("You must type in words")
Else
   $Voice.Speak ($tnr)
EndIf
Case $Button2
Exit
EndSwitch
WEnd
发表于 2012-4-14 22:35:53 | 显示全部楼层
原则上是鼓励发源码的
但对于本帖, 我认为是白白占用 <中文资料> 这版块的空间而已.
发表于 2012-4-15 00:34:47 | 显示全部楼层
感谢楼主分享,就是不知道该怎么停止
发表于 2012-4-15 00:42:23 | 显示全部楼层
能阅读中文就好了。。。
发表于 2012-4-15 20:07:08 | 显示全部楼层
发表于 2012-4-29 16:58:19 | 显示全部楼层
不明白干什么用的
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-5 19:02 , Processed in 0.077175 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表