MozTW 討論區

各項 Mozilla 相關軟體與技術討論
現在的時間是 2025-08-04, 10:46

所有顯示的時間為 UTC + 8 小時





發表新文章 回覆主題  [ 2 篇文章 ] 
發表人 內容
文章發表於 : 2005-06-27, 22:51 
離線

註冊時間: 2005-06-27, 22:49
文章: 2
我想當沒有firefox 就會自動開啟,但找找不到firefox 的progid,
請各位幫忙


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2005-06-28, 23:59 
離線

註冊時間: 2005-06-27, 22:49
文章: 2
已經成功了,那樣就會每10 分鐘看看有沒有firefox run 緊,沒有就開一個,方便家人用firefox,因為通常見到有個brower開著都不會開一個新的,便他們習慣用firefox, 大家都試試

Set WshShell = WScript.CreateObject("WScript.Shell")


dim min ,time
min= 10 'how many minutes you want to check
time = min*60*1000
While true
Set locator = CreateObject("WbemScripting.SWbemLocator")
Set service = locator.ConnectServer()
Set props = service.ExecQuery("select name, description from Win32_Process where name = 'firefox.exe'") 'find there exist firefox running or not

If props.count = 0 Then
FF= WShShell.Run("firefox.exe",3,true)

End If
Wscript.Sleep time
Wend


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
 個人資料  
引用回覆  
顯示文章 :  排序  
發表新文章 回覆主題  [ 2 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 83 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯您的文章
不能 在這個版面刪除您的文章
不能 在這個版面上傳附加檔案

搜尋:
前往 :  
Powered by phpBB® Forum Software © phpBB Group
正體中文語系由 竹貓星球 維護製作
© moztw.org, Mozilla Foundation
MozTW,Mozilla 台灣社群