我剛剛編寫了一個Windows小工具的基本腳本,它可以安靜地運行,直到它識別出一個變化。我遇到的一個問題是,我想看到小工具,並有彎曲的邊緣。我嘗試使用刪除角落的一個PNG圖像,但它不起作用,它總是顯示爲一個方形框。我也試過通過CSS來做這件事,但我似乎無法弄清楚。HTA - Windows小工具曲邊
有誰知道如何在HTA/CSS/VBScript中創建曲線邊緣?我不確定它會發生什麼,它是一個小工具。
非常感謝。
//編輯
這裏是整個代碼:
<html>
<head>
<title>Chrome Version Checker</title>
<HTA:APPLICATION
APPLICATIONNAME="Chrome Version Checker"
ID="ChromeCheck"
VERSION="1.0.0.0"
BORDER="thin"
BORDERSTYLE="complex"
ICON="chrome_updater_256px.ico"
SCROLL="no"
SINGLEINSTANCE="yes"
CONTEXTMENU="no"
NAVIGABLE="yes"
SELECTION="no"/>
<script language="vbscript">
Dim timerID, CurrentTime
Sub Window_OnLoad
timerID = window.setInterval("RefreshTime", 360000) 'milliseconds
RefreshTime
End Sub
self.ResizeTo 190,194
</script>
<style type="text/css">
body
{
margin: 0;
width: 130px;
height: 134px;
}
span
{ text-align:center;
font-family: arial;
font-weight: bold;
font-size: 12px;
}
</style>
</head>
<body>
<table align="center">
<tr>
<td>
<span>Installed File</span>
<br />
<span id = "InstallFile"></span>
</td>
</tr>
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td>
<span>Remote File</span>
<br />
<span id = "RemoteFile"></span>
</td>
</tr>
<tr>
<td colspan="2">
<br /><span id = "StatusMSG"></span>
</td>
</tr>
</table>
</body>
<html>
<SCRIPT LANGUAGE="VBScript">
Sub RefreshTime
set xmlhttp = createobject ("msxml2.xmlhttp.3.0")
xmlhttp.open "get", "http://en.wikipedia.org/wiki/Google_Chrome", false
xmlhttp.send
strOutput = split(xmlhttp.responseText,"Stable release</a>")(1)
strOutput = split(strOutput," <small>")(0)
strOutput = replace(replace(strOutput,vbcr,""),vblf,"")
strOutput = split(strOutput,"<p>")(1)
Dim File
set FSO = CreateObject("Scripting.FileSystemObject")
File = FSO.GetFileVersion("C:\Program Files\Google\Chrome\Application\chrome.exe")
if File = strOutput Then
InstallFile.InnerHTML = File
RemoteFile.InnerHTML = strOutput
StatusMSG.InnerHTML = "Up to date"
document.body.background="tick.png"
document.body.style.backgroundPosition = "center"
document.body.style.backgroundRepeat = "no-repeat"
else
InstallFile.InnerHTML = File
RemoteFile.InnerHTML = strOutput
StatusMSG.InnerHTML = "Not up to date"
document.body.background="cross.jpg"
' ---------------------------------------
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.load "\\s007\Global\IT\ChromeStandaloneSetup.xml"
xmlDoc.Async = "False"
Set nNode = xmlDoc.selectsinglenode ("//ChromeUpdater/Config/Version")
nNode.text = strOutput
strResult = xmldoc.save("\\s007\Global\IT\ChromeStandaloneSetup.xml")
' ---------------------------------------
Dim iURL
Dim objShell
iURL = "https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7B8DD6B5B9-54BE-D8AD-7E05-FBA19DDAA0B0%7D%26lang%3Den%26browser%3D4%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dtrue%26installdataindex%3Ddefaultbrowser/update2/installers/ChromeStandaloneSetup.exe"
set objShell = CreateObject("Shell.Application")
' --------------------------
objShell.ShellExecute "chrome.exe", iURL, "", "", 1
'---------------------------
Ret = Msgbox("Do you wish to update now?",VBYesNo,"Update Now")
If Ret = 6 then
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("""C:\Program Files\Chrome Updater\ChromeUpdateV2.exe""")
Set objShell = Nothing
else
End If
End If
End Sub
</SCRIPT>
非常感謝
你可以編輯你的問題來顯示你已經有的代碼/ css嗎? –
當IE> 8安裝時,會出現這樣的技巧:「<!DOCTYPE html>'&'' – Teemu
非常感謝,我需要使用透明PNG才能正常工作? – Hyperjase