找回密码
 加入
搜索
查看: 4703|回复: 6

[交流] [已解決]上下按紐 按1次 +100 -100 要如何做?

  [复制链接]
发表于 2011-10-3 19:52:06 | 显示全部楼层 |阅读模式
本帖最后由 tcpuuu 于 2012-2-22 16:01 编辑



上下按紐 按1次 +100 -100 要如何做?
除了加100 減100之後    再 繼續其他指令 該如何做?
GUICreate('Lron Butterfly',200,180,1,1)      

$input = GUICtrlCreateInput("7200", 10, 10, 80, 22,0x01)
GUICtrlSetFont($input,12)
$updown = GUICtrlCreateUpdown($input)

GUISetState()
While 1
        $msg = GUIGetMsg()
        Switch $msg
                Case -3
                        Exit

EndSwitch
WEnd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-10-4 19:00:07 | 显示全部楼层
我只能做成这样的  你试试  功能大体上是一样的
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 661, 361)
$Edit1 = GUICtrlCreateEdit("", 8, 8, 177, 65)
GUICtrlSetData(-1, "7201")
$Button1 = GUICtrlCreateButton("+100", 192, 8, 121, 25)
$Button2 = GUICtrlCreateButton("-100", 192, 40, 121, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Dim $jia, $jian
$duqu = GUICtrlRead($Edit1)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        _jia()
                Case $Button2
                        _jian()
        EndSwitch
WEnd

Func _jia()
        $jia = $duqu + 100
        GUICtrlSetData($Edit1, $jia)
        $duqu = GUICtrlRead($Edit1)
EndFunc

Func _jian()
        $jian = $duqu - 100
        GUICtrlSetData($Edit1, $jian)
        $duqu = GUICtrlRead($Edit1)
EndFunc
 楼主| 发表于 2011-10-4 20:01:39 | 显示全部楼层

這樣不好看


如果要這樣  寫成底下這樣  不是更簡單
------------------------------------------------
Case $1Button
GUICtrlSetData($S1,GUICtrlRead($S1)+100)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-10-5 08:34:01 | 显示全部楼层
回复 3# tcpuuu


    我很菜的   对我来说   美观不是主要的    能实现功能就OK了
发表于 2011-10-10 22:38:58 | 显示全部楼层
用GUIRegisterMsg 可不可以?定位+捕捉
发表于 2011-10-11 18:31:58 | 显示全部楼层
学习下,实用就行,界面不是问题
发表于 2012-12-20 19:07:46 | 显示全部楼层
支持支持熱烈支持
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-27 07:37 , Processed in 0.079401 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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