大佬教程收集整理的这篇文章主要介绍了windows – AutoHotKey:带多行输入的InputBox,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我希望有两个按钮,“Ok”和“Cancel”,我希望它们都有加速器.我希望这个代码是一个函数的形式,我可以从其他热键调用,以便随时获取多行用户输入.我希望能够设置显示对话框时显示的默认文本.如果按下取消按钮,我希望函数返回null或空字符串.我希望Esc键使对话框关闭,就像按下取消按钮一样(并且不退出整个脚本).我希望对话框显示在屏幕的中央,并使用Windows通常用于对话框的字体.
!1:: MsgBox % MultiLineInputBox("Hello World:","stuff,more stuff","Custom Caption") return MultiLineInputBox(Text:="",Default:="",Caption:="Multi Line Input Box"){ static ButtonOK:=ButtonCancel:= false if !MultiLineInputBoxGui{ Gui,MultiLineInputBox: add,Text,r1 w600,% Text Gui,Edit,r10 w600 vMultiLineInputBox,% Default Gui,Button,w60 gMultiLineInputBoxOK,&OK Gui,w60 x+10 gMultiLineInputBoxCancel,&Cancel MultiLineInputBoxGui := true } GuiControl,MultiLineInputBox:,MultiLineInputBox,% Default Gui,MultiLineInputBox: Show,% Caption Sendmessage,0xB1,-1,Edit1,A while !(ButtonOK||ButtonCancel) conTinue if ButtonCancel return Gui,MultiLineInputBox: Submit,NoHide Gui,MultiLineInputBox: Cancel return MultiLineInputBox ;---------------------- MultiLineInputBoxOK: ButtonOK:= true return ;---------------------- MultiLineInputBoxGuiEscape: MultiLineInputBoxCancel: ButtonCancel:= true Gui,MultiLineInputBox: Cancel return }
以上是大佬教程为你收集整理的windows – AutoHotKey:带多行输入的InputBox全部内容,希望文章能够帮你解决windows – AutoHotKey:带多行输入的InputBox所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。