微剋多資訊

 找回密碼
 註冊

Sign in with google

Google帳號登入

搜索

該用戶從未簽到

升級   79%

11F
發表於 2013-2-7 09:35 | 只看該作者
謝謝解惑!這comments指令不太熟,研究研究!

使用道具

該用戶從未簽到

升級   0%

12F
 樓主| 發表於 2013-2-8 14:02 | 只看該作者
風飄雪 發表於 2013-2-8 12:09
你好,我根據教學文步驟,但是依然卡住~"~
無論是用send或是ControlClick都沒有反應

軟體載點可以提供嗎,幫你測試看看

使用道具

該用戶從未簽到

升級   79%

13F
發表於 2013-2-8 17:13 | 只看該作者
風飄雪 發表於 2013-2-8 16:42
軟體在點在此~感謝

http://www.snort.org/downloads/2094

可以啊!貼上簡單的代碼,等樓主解惑較深奧的代碼!


Run("AutoIns.exe")
WinWait("Snort 2.9.4 Setup ","If you accept the terms of the")
WinActivate("Snort 2.9.4 Setup ")
ControlClick("Snort 2.9.4 Setup ","","Button2")
WinWait("Snort 2.9.4 Setup ","Position your mouse over a com")
WinActivate("Snort 2.9.4 Setup ")
ControlClick("Snort 2.9.4 Setup ","","Button2")
WinWait("Snort 2.9.4 Setup ","Setup will install Snort 2.9.4")
WinActivate("Snort 2.9.4 Setup ")
ControlClick("Snort 2.9.4 Setup ","","Button2")
WinWait("Snort 2.9.4 Setup ","Completed")
WinActivate("Snort 2.9.4 Setup ")
ControlClick("Snort 2.9.4 Setup ","","Button2")
WinWait("Snort 2.9.4 Setup","Snort has successfully been in")
WinActivate("Snort 2.9.4 Setup")
ControlClick("Snort 2.9.4 Setup","","Button1")
WinWaitClose("Snort 2.9.4 Setup")
請樓主指正

使用道具

簽到天數: 189

該用戶今日未簽到

升級   100%

14F
發表於 2013-2-8 17:55 | 只看該作者
風飄雪 發表於 2013-2-8 17:52
貼圖我會,並非第一次使用這種功能..
我只是疑惑..為什麼我一開始的那次會失敗..

是喔... sorry~
所以是那次不行囉
那現在ok嗎^^

不過我以前也遇過一次怎麼貼都沒東西的窘境...哈哈...

使用道具

簽到天數: 189

該用戶今日未簽到

升級   100%

15F
發表於 2013-2-8 18:07 | 只看該作者
風飄雪 發表於 2013-2-8 18:00
我那串網址還是不能用...奇怪了0.0a...
算了..不管它..反正之後就換其他空間用就好..

找到了~
你的圖空要這樣用...
複製圖片網址再貼
  1. [img=844,603]http://www.freeimagehosting.net/newuploads/8anuu.png[/img]
複製代碼

本帖子中包含更多資源

您需要 登入 才可以下載或查看,沒有帳號?註冊

x

使用道具

該用戶從未簽到

升級   79%

16F
發表於 2013-2-8 18:25 | 只看該作者
風飄雪 發表於 2013-2-8 18:03
不好意思,我試用你的也還是一樣會卡在"同意"的那個畫面不會往下..0.0
所以可能是我本身環境的關係嗎??
...

測試可行啊!你看看
錄像:http://www.mediafire.com/?25oc7bql3d0353c

使用道具

簽到天數: 189

該用戶今日未簽到

升級   100%

17F
發表於 2013-2-8 18:37 | 只看該作者
本帖最後由 gary8349 於 2013-2-8 18:53 編輯
風飄雪 發表於 2013-2-8 18:32
不好意思,我不是懷疑你,切勿誤會,
我剛剛有提到個問題,是不是我本身環境因素影響(w7/64bit) ??
還是 ...

您是用這個指令嗎?
  1. Run("AutoIns.exe")
  2. WinWait("Snort 2.9.4 Setup ","If you accept the terms of the")
  3. WinActivate("Snort 2.9.4 Setup ")
  4. ControlClick("Snort 2.9.4 Setup ","","Button2")
  5. WinWait("Snort 2.9.4 Setup ","Position your mouse over a com")
  6. WinActivate("Snort 2.9.4 Setup ")
  7. ControlClick("Snort 2.9.4 Setup ","","Button2")
  8. WinWait("Snort 2.9.4 Setup ","Setup will install Snort 2.9.4")
  9. WinActivate("Snort 2.9.4 Setup ")
  10. ControlClick("Snort 2.9.4 Setup ","","Button2")
  11. WinWait("Snort 2.9.4 Setup ","Completed")
  12. WinActivate("Snort 2.9.4 Setup ")
  13. ControlClick("Snort 2.9.4 Setup ","","Button2")
  14. WinWait("Snort 2.9.4 Setup","Snort has successfully been in")
  15. WinActivate("Snort 2.9.4 Setup")
  16. ControlClick("Snort 2.9.4 Setup","","Button1")
  17. WinWaitClose("Snort 2.9.4 Setup")
複製代碼
我測試的情形
是正常可以用的
win7 x64
若是轉成exe再以管理員權限執行的話可以嗎?

使用道具

該用戶從未簽到

升級   79%

18F
發表於 2013-2-8 19:43 | 只看該作者
風飄雪 發表於 2013-2-8 19:32
沒反應..完全不會動..XD

右下角結束腳本
還有我是用MsgBox指令,
看看程式跑到那出的問題,
小弟初學者,還是請噹噹大師幫你解決!

使用道具

該用戶從未簽到

升級   79%

19F
發表於 2013-2-8 20:25 | 只看該作者
風飄雪 發表於 2013-2-8 19:49
>""<

====================

不會吧!autoit用新一點的吧3390!

使用道具

該用戶從未簽到

升級   0%

20F
 樓主| 發表於 2013-2-8 23:19 | 只看該作者
測試OK沒問題

順便幫你壓成EXE了
http://www.fileswap.com/dl/z8HLVsSCXf/


[code=autoit]#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.8.1
Author:        Dang Wang

Script Function: Snort 2.9.4
        Template AutoIt script.

#ce ----------------------------------------------------------------------------
#Region
#AutoIt3Wrapper_icon=C:\NewDang.ico
#AutoIt3Wrapper_Compression=5
#AutoIt3Wrapper_Res_Comment=Snort
#AutoIt3Wrapper_Res_Description=Snort
#AutoIt3Wrapper_Res_Fileversion=2.9.4
#AutoIt3Wrapper_Res_LegalCopyright=噹噹
#EndRegion

#NoTrayIcon
#RequireAdmin
#include <Misc.au3>
AutoItSetOption ( "WinTitleMatchMode", 4)

Dim Const $FileName=  "Snort_2_9_4_Installer.exe"
Dim Const $FormName1 = "Snort 2.9.4 Setup "
Dim Const $FormName2 = "Snort 2.9.4 Setup"

_Singleton ($FormName2)

;------- (1 Click;2 Check;3 UnCheck;4 SetText )-------
Dim $Text[5][5] = [ [ $FormName1, "Please review the license terms before installing Snort 2.9.4.", "Button2", 1, ""], _
              [ $FormName1, "Choose which features of Snort 2.9.4 you want to install.", "Button2", 1, ""], _
              [ $FormName1, "Choose the folder in which to install Snort 2.9.4.", "Button2", 1, ""], _
              [ $FormName1, "Show &details", "Button2", 1, ""], _
              [ $FormName2, "Snort has successfully been installed.", "Button1", 1, ""] ]

$begin = TimerInit()

FileInstall  ( "Snort_2_9_4_Installer.exe", @TempDir&"\"&$FileName)
ShellExecute (@TempDir&"\"&$FileName)
While 1
  For $i = 0 To UBound ( $Text, 1)-1
    Select
      Case WinExists ( $Text[$i][0], $Text[$i][1])
        If $Text[$i][3] = 1 Then
          ControlClick ( $Text[$i][0], $Text[$i][1], $Text[$i][2])
        ElseIf $Text[$i][3] = 2 Then
          ControlCommand ( $Text[$i][0], $Text[$i][1], $Text[$i][2], "Check", "")
        ElseIf $Text[$i][3] = 3 Then
          ControlCommand ( $Text[$i][0], $Text[$i][1], $Text[$i][2], "UnCheck", "")
        ElseIf $Text[$i][3] = 4 Then
          ControlSetText ( $Text[$i][0], $Text[$i][1], $Text[$i][2], $Text[$i][4])
        EndIf
        If $i = (UBound ( $Text, 1)-1) Then ExitLoop(2)
    EndSelect
  Next
WEnd

$dif = TimerDiff  ($begin)
MsgBox ( 0, "安裝完成", StringFormat ( "總安裝時間:%s秒", $dif/1000))[/code]


使用道具

您需要登入後才可以回帖 登入 | 註冊

本版積分規則

小黑屋|Archiver|微剋多資訊(MicroDuo)

GMT+8, 2024-4-25 22:54

Discuz! X

© 2009-2023 Microduo

快速回覆 返回頂部 返回列表