ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] vba§PÂ_¬O§_¤wµn¤Jºô­¶

¦^´_ 6# msmplay
  1. Option Explicit
  2. Const ¥Î¤á¦WºÙ = "msmplay"
  3. Const ¥Î¤á±K½X = "­×§ï¬°§Aªºµn¤J±K½X"
  4. Private Sub Ex()
  5.     If µn¿ý¬d¬Ý = False Then µn¿ý
  6. End Sub
  7. Private Function µn¿ý¬d¬Ý() As Boolean
  8.     With CreateObject("InternetExplorer.Application")
  9.         .Navigate "http://forum.twbts.com/task.php?item=done"
  10.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  11.         µn¿ý¬d¬Ý = InStr(.Document.BODY.innertext, ¥Î¤á¦WºÙ)
  12.         .Quit        'Ãö³¬ºô­¶
  13.     End With
  14. End Function
  15. Private Sub µn¿ý()
  16.     Dim i As Variant, vDoc As Object
  17.     With CreateObject("InternetExplorer.Application")
  18.         ' .Visible = True
  19.         .Navigate "http://forum.twbts.com/logging.php?action=login"
  20.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  21.         Set vDoc = .Document.getElementsByTAGName("INPUT")
  22.         For i = 0 To vDoc.Length - 1
  23.             If vDoc(i).Name = "username" Then vDoc(i).Value = ¥Î¤á¦WºÙ
  24.             If vDoc(i).Name = "password" Then vDoc(i).Value = ¥Î¤á±K½X: Exit For
  25.         Next
  26.         Set vDoc = .Document.getElementsByTAGName("input") '.Click
  27.         For i = 0 To vDoc.Length - 1
  28.             If vDoc(i).Type = "checkbox" Then vDoc(i).Click: Exit For
  29.         Next
  30.         Set vDoc = .Document.getElementsByTAGName("button") '.Click
  31.         For i = 0 To vDoc.Length - 1
  32.             If vDoc(i).Name = "loginsubmit" Then vDoc(i).Click: Exit For
  33.         Next
  34.         i = Time
  35.         Do
  36.             DoEvents
  37.             If Time > i + #12:00:30 AM# Then MsgBox .Document.Title & vbLf & " µn¤J¥¢±Ñ !": .Quit: End
  38.         Loop Until InStr(.Document.BODY.innertext, ¥Î¤á¦WºÙ)
  39.         .Quit
  40.     End With
  41. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# msmplay
  1. '½Ð¥ý±N±M®× [³]©w¤Þ¥Î¶µ¥Ø]¥[¤J  Microsoft Internet Controls
  2. Option Explicit
  3. Dim myIE As New InternetExplorer
  4. Const myURL = "http://forum.twbts.com/my.php?item=threads" '§Úªº©«¤l¤À­¶
  5. Sub TEST()
  6.     'Set myIE = CreateObject("InternetExplorer.Application")
  7.     With myIE
  8.         .Visible = True
  9.         .Navigate "http://forum.twbts.com/index.php" '¶i¤J³Â»¶®a±Ú°Q½×°Ï
  10.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  11.         .Document.all.mycredits.Click 'ÂI¿ï¶i¤J§Úªº©«¤l¡A¦ý¶}±Òºô­¶®É¬O¦Û°Ê¶}±Ò¤@­Ó·sªº¤À­¶¡A¦Ó¥Bµe­±¤£·|¦Û°Ê¤Á´«¨ì·s¤À­¶­¶ÅÒ(µe­±¤´°±¯d¦b­ì­¶­±)
  12.         Do:     DoEvents:         Loop Until InStr(.Document.BODY.INNERTEXT, " §Úªº©«¤l")
  13.     End With
  14.     IE_Function
  15.     ''§Úªº©«¤l¤À­¶¤¤-- Âಾ¤À­¶ºô§}
  16.     With myIE
  17.          .Navigate "http://forum.twbts.com/thread-20650-1-1.html"
  18.           Do While .Busy Or .readyState <> 4: DoEvents: Loop
  19.     End With
  20. End Sub
  21. Private Function IE_Function()
  22.     Dim shell_windows As New SHDocVw.ShellWindows
  23.     Dim IE As SHDocVw.InternetExplorer
  24.     Dim objShell As Object
  25.     Set myIE = Nothing
  26.     Set objShell = CreateObject("shell.application")
  27.     If objShell.Windows.Count = 0 Then  '¨¾§b   :  Ie ¨S¦³¶}±Ò
  28.         Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE", 2  ' (2  À³¥Îµ{¦¡µøµ¡·|¥H¤@­Ó¹Ï¥Ü¨ÓÅã¥Ü¡A¨Ã¨ã¦³¾nÂI)
  29.         MsgBox "½Ðµ¥­Ô ie ¶}±Ò§¹²¦": End
  30.     End If
  31.     For Each IE In shell_windows
  32.         With IE
  33.             Do While .Busy Or .readyState <> 4:         Loop
  34.             If .LocationURL = myURL Then
  35.                 Set myIE = IE
  36.                Exit Function
  37.             End If
  38.         End With
  39.     Next
  40. End Function
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD