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

[µo°Ý] µn¤Jºô­¶¿ï¾Ü¤é´Á¤U¸ü¸ê®Æ°ÝÃD

[µo°Ý] µn¤Jºô­¶¿ï¾Ü¤é´Á¤U¸ü¸ê®Æ°ÝÃD

¥Ø«e¥u·|¼g¨ì¥H¤Uµn¤Jºô­¶¡A¦ý§Æ±æ¥i¥H³z¹L¦Û°Ê¤Æ¨ú¥N¨C¤é¤H¤u§@·~¡A¥i¥H½Ð¤j®v­ÌÀ°À°¦£¶Ü~~~~
¥t¥~·Q½Ð°Ý¤j®v­Ì¦pªG³o¤£¥ÎVBA¨Ó¼g¡A¬O¤£¬O¥Î.vbs©Î.bat¤]¥i¥H°µ¨ì¡A©Î­þ¤@­Ó·|¤ñ¸û¦³®Ä²v©O¡HÁÂÁ¡ã¡ã¡ã¡ã
------------------------------------------------------------------------
Sub test()
    Dim a As Object, b As Object
    Set a = CreateObject("internetexplorer.application")
    With a
    .navigate "http://10.178.1.140:8023/Login.aspx"
     Do While .ReadyState <> 4
         DoEvents
    Loop
   .Visible = True
    Set b = .Document.all.tags("INPUT")
    .Document.all.txtUserName.innertext = "XXXXX"
    .Document.all.txtPassword.innertext = "XXXXX"
    .Document.all.btnLogin.Click
    End With
End Sub
------------------------------------------------------------------------
¥H¤W¥i¥Hµn¤Jºô­¶¡Aµn¤J«áªººô§}·|Åܦ¨http://10.178.1.140:8023/ConditionPage/ConditionEmpty.aspx
¤£¹Lµn¤J«á­nÂI¿ïªº¨BÆJ+¹Ï¤å»¡©ú¥i¯à·|¦³ÂIªø¡A©Ò¥H§Ú§â¥¦©ñ¨ìªþÀÉ¡A¦pªG¥i¥H~~~~~§Æ±æ³o¨Ç¨C¤Ñ¤H¤u­«½Æ°Ê§@ªº¨BÆJ¥i¥H¦Û°Ê°õ¦æ
µn¤Jºô­¶¿ï¾Ü¤é´Á¤U¸ü¸ê®Æ°ÝÃD1.rar (963.35 KB)
µn¤Jºô­¶¿ï¾Ü¤é´Á¤U¸ü¸ê®Æ°ÝÃD2.rar (790.87 KB)

µn¤Jºô­¶¿ï¾Ü¤é´Á¤U¸ü¸ê®Æ°ÝÃD3.rar (793.26 KB)
*¦v¤k¤@ªTµL»~*

¦^´_ 1# msmplay

¨º¬O§A¤½¥q¤º³¡ªººô­¶§a

TOP

¦^´_ 2# jackyq


   j¤j~~~~¨S¿ù
*¦v¤k¤@ªTµL»~*

TOP

§ì¤å+´ú¸Õ¤F¦n¤[¡A²×©ó­×­×§ï§ï¥X¤F¥H¤U§Ú©Ò»Ý­nªºµ{¦¡½X¡A¥u¬O¥Ø«eÁÙ¹J¨ì´X­Ó°ÝÃD¡A¤£ª¾¹D¯à¤£¯à½Ð¨ä¥L¤j®v­ÌÀ°¬Ý¤@¤U~~~

¥H¤U¬O§Ú§Æ±æ¯à¦Û°Êµn¤J¤½¥qºô¯¸ > ÂI¿ï¬d¸ß¤é´Á > ¤U¸ü©Ò»Ý¼Æ¾ÚÀɮסA¦ý¦]¬°¬O¤½¥q¤ººôµLªk´£¨Ñ´ú¸Õºô­¶¡A·Q°Ý³Ì«á¤@¨B¦Û°Ê¦sÀɪºµ{¦¡½X­n«ç»ò±µÄò¼g©O¡H
¥t¥~¬d¸ß¤é´Ájavascript:__doPostBack('ctl00$phCondition3$cldDate','6656'³o¬q¡A¸Ó¦p¦óÅý'6656'³o­Ó¼Æ¦r¯à¦Û°Ê§ó·s¡A©Î¥Î¤°»ò¤è¦¡¥i¥HÅý¼Æ¦r¨C¤Ñ¦Û°Ê+1©O¡H¨Ò¦p'6656'¬O¤µ¤Ñ3/23¡A§Æ±æ©ú¤Ñ¯à¦Û°ÊÂI¿ï'6657'´N¬O3/24·í¤Ñ¡A«á¤Ñ¯à¦Û°ÊÂI¿ï'6658'´N¬O3/25·í¤Ñ...¥H¦¹Ãþ±À¡C

Sub ¦Û°Êµn¤J()
Dim a As Object
Set myIE = CreateObject("InternetExplorer.Application")
With myIE
  .Visible = False
  .Navigate "http://10.178.1.140:8023/Login.aspx" 'µn¤Jºô§}

     Do While .ReadyState <> 4
        DoEvents
     Loop

Set a = .document.all.tags("INPUT")
  .document.all.txtUserName.innertext = "BS0110" 'µn¤J±b¸¹
  .document.all.txtPassword.innertext = "BS0110" 'µn¤J±K½X
  .document.all.btnLogin.Click 'ÂI¿ïµn¤J«ö¶s

     Do Until .ReadyState = 4
        DoEvents
     Loop

  .Navigate "http://10.178.1.140:8023/ConditionPage/ConditionAgentDay.aspx" '¬d¸ß¼Æ¾Úºô§}
  Application.Wait Now + 2 / 86400 'µ¥«Ý2¬í
  .document.all.ctl00_tvReportListt16.Click 'ÂI¿ï¶i¤J¼Æ¾Úºô§}ªº½T»{«ö¶s
  Application.Wait Now + 2 / 86400 'µ¥«Ý2¬í
  .Navigate "javascript:__doPostBack('ctl00$phCondition3$cldDate','6656')" 'ÂI¿ï¬d¸ß¤é´Á'6656'¥Nªí¼Æ¦r23¡A¤]´N¬O·í¤ë23¸¹
  Application.Wait Now + 2 / 86400 'µ¥«Ý2¬í
  .document.forms(0).all("ctl00_btnConfirm").Click 'ÂI¿ï¬d¸ß«ö¶s
  Application.Wait Now + 2 / 86400 'µ¥«Ý2¬í
  .Navigate "http://10.178.1.140:8023/ReportPage/ReportAgentToDay_28_tptv.aspx" '¬d¸ß¼Æ¾Ú·|¦Û°Ê²£¥Í©ó¦¹ºô§}­¶­±
     Do Until .ReadyState = 4
        DoEvents
     Loop
  .document.forms(0).all("ctl00_btnDownload").Click 'ÂI¿ï¤U¸ü«ö¶s

  'ÂI¿ï¤U¸ü«ö¶s«á¡Aºô­¶·|¼u¥X¤U¸üÀÉ®×µøµ¡¡A¸ß°Ý"¶}±ÒÂÂÀÉ"¡B"Àx¦s"¡B"¨ú®ø"¿ï¶µ
  '§Æ±æ¯à¦Û°ÊÀx¦s¦Ü¦P¸ê®Æ§¨¨Ã«O«ù­ìÀɦW.csvÀÉ(¤U¸üÀɮ׬°.csvÀÉ)
  '½Ð°Ý¥H¤W³o¬qµ{¦¡½X¸Ó«ç»ò¼g©O¡H

End With
End Sub
*¦v¤k¤@ªTµL»~*

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD