cat6628 发表于 2012-10-17 09:53:29

请问这段代码如何做点击图片打开一个网站

#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\XLSoft\Files\迅雷\ico.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <array.au3>
#include <ButtonConstants.au3>
#include <File.au3>
#include <GDIPlus.au3>
#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiStatusBar.au3>
#include <GuiListView.au3>
#include <ListViewConstants.au3>
#include <SendMessage.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <sound.au3>

$old_pg_pathname = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
$ini_file = @ScriptDir & "\softinst.ini"
$pgname = IniRead($ini_file, "Config", "软件作者", " 网 络 管 理 室   copyright(2011~2012)")
$pgico = IniRead($ini_file, "Config", "安装图标", "\run.ico")
$title = IniRead($ini_file, "Config", "安装标题", "软件安装管理器")
$new_pg_pathname = IniRead($ini_file, "Config", "安装路径", $old_pg_pathname)
$pgbmp = IniRead($ini_file, "Config", "自定义图片", "\logo.jpg")
$ver = IniRead($ini_file, "Config", "版本号", " v1.0")
$form_name = $title & $ver
$ini_gp_num = IniReadSection($ini_file, "type")
Dim $Button, $listview
If @error Then
        MsgBox(16, "提示", "请检查配置文件soft.ini" & @CRLF & @CRLF & "没有选择任何软件类别")
        Run("配置文件管理.exe")
EndIf
$name_kg = ""

For $name_temp = 1 To (755 - 180 - StringLen($pgname) * 2) / 2 / 7
        $name_kg = $name_kg & " "
Next
$name1 = $name_kg & $pgname

$Form1_1 = GUICreate($form_name, 828, 517, 216, 225)
GUISetIcon(@ScriptDir & $pgico)
GUISetBkColor(0x99B4D1)
$Pic1 = GUICtrlCreatePic(@ScriptDir & $pgbmp, 0, 0, 825, 113, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
Local $aText = ["   " & @YEAR & "年" & @MON & "月" & @MDAY & "日", $name1, @HOUR & ":" & @MIN]
Local $aParts =
$hStatus = _GUICtrlStatusBar_Create($Form1_1, $aParts, $aText)
$But_all = GUICtrlCreateButton("全   选", 464, 443, 81, 33)
GUICtrlSetFont(-1, 9, 800, 0, "宋体")
$But_no = GUICtrlCreateButton("全 不 选", 600, 443, 81, 33)
GUICtrlSetFont(-1, 9, 800, 0, "宋体")
$But_an = GUICtrlCreateButton("开始安装", 736, 443, 81, 33)
GUICtrlSetFont(-1, 9, 800, 0, "宋体")
$Chk_Auto = GUICtrlCreateCheckbox("自动安装", 8, 440, 121, 33)
GUICtrlSetState($Chk_Auto, $GUI_HIDE)
GUICtrlSetFont(-1, 9, 800, 0, "宋体")
GUISetState(@SW_SHOW)



$pgbmp = IniRead($ini_file, "Config", "自定义图片", "\logo.jpg") 想点击这个图片打开一个网站该怎么弄

love5173 发表于 2012-10-17 12:07:14

回复 1# cat6628
复杂点的就是判断鼠标坐标,跟按键
简单点就是做个按钮,按钮的图标设置成这个图片,按钮的属性设置成不突起就可以了
页: [1]
查看完整版本: 请问这段代码如何做点击图片打开一个网站