您需要 登录 才可以下载或查看,没有账号?加入
举报
我都晕了,啥时候在这评分了,呵呵 afan 发表于 2009-9-26 10:35
看到过类似的例子,我找找先 afan 发表于 2009-9-26 10:47
$Form1 = GUICreate("超链", 137, 146, 404, 273) $txt = GUICtrlCreateLabel("联系我们", 40, 40, 52, 16) GUICtrlSetCursor(-1, 0) GUISetState() Dim $bj = 0 While 1 $zt = GUIGetCursorInfo($Form1) If $zt[4] = $txt And $bj = 0 Then GUICtrlSetFont(-1, 9, 400, 4) GUICtrlSetColor(-1, 0x0000FF) $bj = 1 ElseIf $zt[4] <> $txt And $bj = 1 Then GUICtrlSetFont(-1, 9, 400, 0) GUICtrlSetColor(-1, 0x000000) $bj = 0 EndIf $nMsg = GUIGetMsg() Switch $nMsg Case - 3 Exit Case $txt Msgbox(0,0,'OK') EndSwitch WEnd
Opt("GUIOnEventMode", 1) $Form = GUICreate("宝宝出生倒计时计算器", 425, 400) GUISetOnEvent(-3, "tc") $lj = GUICtrlCreateLabel("访问鼎盛中国博客", 280, 323, 200, 17) GUICtrlSetFont(-1, 10, 400, 4) GUICtrlSetColor(-1, 0x0000FF) GUICtrlSetCursor(-1, 0) GUICtrlSetOnEvent(-1, "lj") GUISetState() While 1 Sleep(5) WEnd Func tc() Exit EndFunc ;==>tc Func lj() ShellExecute("http://www.autoitx.com") EndFunc ;==>lj
$Form1 = GUICreate("超链", 137, 146, 404, 273) $txt = GUICtrlCreateLabel("联系我们", 40, 40, 52, 16) GUICtrlSetCursor(-1, 0) GUISetState() Dim $bj = 0 While 1 $zt = GUIGetCursorInfo($Form1) I ... afan 发表于 2009-9-26 10:56
1是表达式,若该表达式的值为true(真)(即1)则重复执行循环体语句 afan 发表于 2009-9-27 10:16
…… $lj = GUICtrlCreateLabel("访问鼎盛中国网站", 260, 325,96, 14) GUICtrlSetCursor(-1, 0) ; Global $vPartEdge[2], $vPartText[2] $vPartEdge[0] = 200 $vPartEdge[1] = 400 $vPartText[0] = ' 今天日期是:' & @YEAR & '年 ' & @MON & '月 ' & @MDAY & '日' $vPartText[1] = ' Coded by 鼎盛中国,QQ:93737788' _GUICtrlStatusBar_Create($Form, $vPartEdge, $vPartText) _Set(GUICtrlRead($Date)) GUISetState(@SW_SHOW);窗口创建后是处于隐藏状态的,因此您必须使用本函数来使它们显示出来(@SW_SHOW). Dim $bj = 0 While 1 $zt = GUIGetCursorInfo($Form);获取(相对于 GUI 窗口的)鼠标位置. If $zt[4] = $lj And $bj = 0 Then GUICtrlSetFont(-1, 9, 400, 4) GUICtrlSetColor(-1, 0x0000FF) $bj = 1 ElseIf $zt[4] <> $lj And $bj = 1 Then GUICtrlSetFont(-1, 9, 400, 0) GUICtrlSetColor(-1, 0x000000) $bj = 0 EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _UnLoadSkin($hSkinDll) FileDelete($SkinFile) FileDelete($SkinDll) Exit Case $Date _Set(GUICtrlRead($Date)) _Write($IniFile, 'Baby', 'PregnantDate', GUICtrlRead($Date)) Case - 3 Exit Case $lj ShellExecute("http://hi.baidu.com/cnace") EndSwitch WEnd ……
GUICtrlSetColor(-1, 0x0000FF) 这里面-1是指最后创建的控件,显然你的不是。将4处-1都改成 $lj afan 发表于 2009-9-27 11:43
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-10-3 16:25 , Processed in 0.074373 second(s), 15 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2025 Discuz! Team.