vbs 中調用shell.application 簡單函數_vbs

來源:互聯網
上載者:User
Set os=CreateObject("wscript.shell")
Set os0=CreateObject("shell.application")
Do 
input1=InputBox(" 請選擇:"+chr(13)+chr(13)+ _
        "1. 全部視窗最小化"+chr(13)+ _ 
        "2. 視窗狀態複原"+chr(13)+ _ 
        "3. 視窗均勻平鋪"+chr(13)+ _
        "4. 視窗縱向平鋪"+chr(13)+ _
        "5. 視窗重疊展開" +Chr(13)+ _
        "6. 資源管理員"+chr(13)+ _ 
        "7. 設定系統時間" +Chr(13) + _
        "8. 重新整理系統功能表" +Chr(13)+ _
        "9. 手動設定開始菜單"+Chr(13)+ _
        "10. 搜尋檔案"+Chr(13)+ _
        "11. 搜尋電腦"+Chr(13)+ _
        "12. 運行"+Chr(13)+ _ 
        "13. 協助"+Chr(13)+ _
        "14. 開啟檔案夾"+Chr(13)+ _
        "15. 掛起系統"+Chr(13)+ _
        "16. 關閉系統" +Chr(13)+ _
        "","vbs shell32 功能調用")
Select Case input1
Case 1
     os0.MinimizeAll
Case 2
     os0.UndoMinimizeALL
Case 3
     os0.TileHorizontally
Case 4
     os0.TileVertically
Case 5
     os0.CascadeWindows
Case 6
     p1=os.SpecialFolders("desktop")
     os0.Explore(p1)
Case 7
     os0.SetTime
Case 8
     os0.RefreshMenu
Case 9
     os0.TrayProperties
Case 10
     os0.FindFiles
Case 11
     os0.FindComputer
Case 12
     os0.FileRun
Case 13
     os0.Help
Case 14
     Set path1=os0.BrowseForFolder(0,"選擇要開啟的檔案夾:",0)
     If path1 Is Nothing Then 
     Else
      os0.Open(path1.self.path)
     End If
Case 15
     os0.Suspend
Case 16 
     os0.ShutdownWindows
Case ""
     Exit Do
Case Else 
     os.Popup "選擇錯誤",2,"錯誤",64+0
End Select
loop
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.