[You must be registered and logged in to see this image.]
ถ้าเราจะสั้งให้กดปุ่ม submit ในโปรแกรม เราจะเขียนประมาณไหนหรอคับจะเอามาใส่ใน ปุ่มAcction แล้วก็เช็คว่าเวบที่เราเปิดมีทั้งหมดกี่ลิงค์อะคับ :(
นี้โค้ชคับ
ถ้าเราจะสั้งให้กดปุ่ม submit ในโปรแกรม เราจะเขียนประมาณไหนหรอคับจะเอามาใส่ใน ปุ่มAcction แล้วก็เช็คว่าเวบที่เราเปิดมีทั้งหมดกี่ลิงค์อะคับ :(
นี้โค้ชคับ
#include <GUIConstants.au3> #include <IE.au3> $GUI = GUICreate("Simple Web Browser", 800, 450) $object = ObjCreate("Shell.Explorer.2") $object_ctrl = GUICtrlCreateObj($object, 16, 10, 780, 400) $url_button = GUICtrlCreateButton("URL", 166, 410, 400, 25, 0) $back_button = GUICtrlCreateButton("Back", 16, 410, 50, 25, 0) ; Creats Back GUI $forward_button = GUICtrlCreateButton("Forward", 66, 410, 50, 25, 0) ; Creates Forward GUI $action_button = GUICtrlCreateButton("Action", 116, 410, 50, 25, 0) ; Creates Refresh GUI $progressbar1 = GUICtrlCreateProgress ( 570, 415, 200, 20, 0) ; Creates Progress bar _IENavigate($object, "[You must be registered and logged in to see this link.] $oweb = _IENavigate($object, "[You must be registered and logged in to see this link.] GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $url_button $URL = Inputbox("Web Browser", "Enter the URL you want to visit.") _IENavigate($Object, $URL) Set_progress() ; Function Case $msg = $back_button ; Send browser to previous page $Object.GoBack Set_progress() ; Function Case $msg = $forward_button ; Send browser forward $Object.GoForward Set_progress() ; Function Case $msg = $action_button ; Action my_action() Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func Set_progress() ; Creates Progress bar For $pg = 0 To 100 Step 5 GUICtrlSetData($progressbar1, $pg) Sleep(2) Next EndFunc Func my_action() EndFunc |