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

[µo°Ý] ³z¹L Sendkeys »yªk¶}±Ò¦³±b¸¹±K½Xªººô­¶°ÝÃD

[µo°Ý] ³z¹L Sendkeys »yªk¶}±Ò¦³±b¸¹±K½Xªººô­¶°ÝÃD

½Ð±Ð¥ý¶i¡G
    Sendkeys ¥\¯à¥i¥H¼ÒÀÀ Áä½L¿é¤Jªº°Ê§@¡A±N¸ê°T¿é¤J....
    ¦ý¬O­n¥Î¦b ¶}±Ò¦³ ±b¸¹±K½X ªººô­¶¡A¸g±`¸I¨ì§xÃø¡A¥H¤U´£¥X2ÂI§xÃøÂI¡A
    ¬Ý¬Ý¦³µL ¥ý¶i¥i¥H«üÂI°g¬z....
    1. ¤£¦Pªººô­¶ ±b¸¹±K½X ©Ò¨Ï¥Îªº¥N¸¹³£¤£¤@¼Ë¡A¸g±`¤£±o¨äªù¦Ó¤J¡A¤£ª¾¹D¦³µL ©T©wªº¼Ò¦¡ ¥i¥H¨ú±o¸Ó¸ê°T¡A
        §_«h³£¤£ª¾¹D­n±N ±b¸¹/±K½X ªº­È Sendkeys µ¹¬Æ»ò°Ñ¼Æ......
    2. Sendkeys ªº°Ê§@®É¶¡ÂI°ÝÃD¡A¦³®É¦]¬°¶}±Òºô­¶³t«×°ÝÃD¡A·|µo¥Í¤Ó¦­ Sendkeys¡A¾É­P ±b¸¹±K½X ¦ì¸m¿ù¶Ã....
        ³o¤@ÂI¦³µL ¸û¦w¥þªº¸Ñ¨M¤è¦¡¡H
    ÁÂÁÂ

JS

¦^´_ 14# Hsieh


¹ï¤£°_, ¤@®É¤â§Ö´N¥´¤F¤f»y.

¦]¬°¦bµó¥~¤£¯à³s±µ¤ºÁpºô,
©ú¤Ñ¦^¨ì¤½¥q¸Õ¸Õ¥Î submit  .

ÁÂÁÂ

TOP

¦^´_ 13# jimmyhk

µo¨¥½Ð¥Î´¶³q¸Ü
¥H¸gÀÙ³¡ªºº¡·N«×½Õ¬dªí¬°¨Ò
  1. Dim MyIe As InternetExplorer, MyDoc As HTMLDocument
  2. Sub CommandButton2_Click()  '¶}±Ò°Ý¨÷
  3. Set MyIe = CreateObject("InternetExplorer.Application")
  4. With MyIe
  5. .Visible = True
  6. .navigate "http://www.moeasmea.gov.tw/ap.asp?xdURL=sVote/vote01.asp&subjectId=9211&ctNode=654"
  7. Do Until .readyState = READYSTATE_COMPLETE: Loop
  8. DoEvents
  9. Set MyDoc = .document
  10. End With
  11. End Sub

  12. Private Sub CommandButton1_Click()  '°e¥X°Ý¨÷«e½Ð¥ý¶ñ§¹°Ý¨÷¦b«ö¦¹Áä°µ°e¥X°Ê§@
  13. With MyDoc
  14. .all("form1").submit
  15. MsgBox "°Ý¨÷½Õ¬dªí¤w°e¥X"
  16. End With
  17. MyIe.Quit
  18. Set MyIe = Nothing
  19. Set MyDoc = Nothing
  20. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_  jimmyhk


    ³o¬Oªí³æ°e¥X
¥²¶·¨Ï¥Îsubmit¤èªk
©Ò¥H§A­n¥H¸Óªí³æ°µsubmit
Hsieh µoªí©ó 2011-10-10 09:14


¦pªGËÝÁ¿§Y«YÉN±o°µ?

TOP

¦^´_ 11# jimmyhk


    ³o¬Oªí³æ°e¥X
¥²¶·¨Ï¥Îsubmit¤èªk
©Ò¥H§A­n¥H¸Óªí³æ°µsubmit
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦³¤@ÂI°ÝÃD,
§Ú²{¦b¬Ý¨ì¨ä¤¤¤@­Óºô¯¸ªº­ì½X¦p¤U:Cancel ¬O¦³ name ªº, ³o­Ó§Ú¥i¥H¨Ï¥Î.
¦ý Login ¨S¦³ ...
jimmyhk µoªí©ó 2011-10-6 21:18



¦³¤H¹J¹L¶Ü?

TOP

¬O³o¼Ë¶Ü?
google·j´M¬°¨Ò :

Sub test()
Dim objIE As Object
Dim url As String
Set objIE = Creat ...
gstone µoªí©ó 2011-10-4 02:25


¦³¤@ÂI°ÝÃD,
§Ú²{¦b¬Ý¨ì¨ä¤¤¤@­Óºô¯¸ªº­ì½X¦p¤U:
  1.   <INPUT TYPE="submit" VALUE="Login">
  2.   <INPUT TYPE="button" NAME="p_request" VALUE="Cancel"
½Æ»s¥N½X
Cancel ¬O¦³ name ªº, ³o­Ó§Ú¥i¥H¨Ï¥Î.
¦ý Login ¨S¦³ name, §ÚÀ³¦p¦ó¼g?

TOP

¦^´_ 8# luhpro


ÁÂÁ±z¡A§Ú¦A¹Á¸Õ¬Ý¬Ý

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2011-10-4 21:45 ½s¿è
¦^´_  luhpro
ÁÂÁ±z¡A¤F¸Ñ±zªº·N«ä
¨º¦³¤ñ¸û§Öªº¤è¦¡¥i¥H±oª¾ ¥Lªº±b¸¹ & ±K½X ­Ó¨Ï¥Î¬Æ»ò¥N¸¹¶Ü¡H
jsleee µoªí©ó 2011-10-4 21:30

¦pªG§AªºÂsÄý¾¹¬O IE ªº¸Ü,
¥i¥HÂI¿ï¥\¯àªí(­Y¬Ý¤£¨ì½Ð«ö¤@¤U Alt Áä) ªºÀ˵ø-> ­ì©l½X,
·íµM, Áٻݭn¤@ÂIÂIªººô­¶»y¨¥¸Ñ´·. (¨Ò¦p¤W­±ºô­¶ªº btnG ´N¥i¥H§ä¨ì)

TOP

¦^´_ 5# gstone

ÁÂÁ±z....
«Ü±µªñ§Ú·Q­nªºªF¦è....
½Ð±Ð±zµ{¦¡½X¤¤ªº·N«ä¡G
1. ½Ð°Ý DoEvents ¬O¬Æ»ò·N«ä¡H
2. Document.all("q") ¬O¥Nªí¬Æ»ò¡H
3. Document.all("btnG") ¬O¥Nªí «ö¶s¶Ü¡H¦p¦ó±oª¾¥Lªº¥N¸¹¡H
½Ð¨ó§U©âªÅ¦^ÂСAÁÂÁ±z.....


Do While objIE.Busy = True   '«Ýºô­¶¸ü¤J§¹¦¨
     DoEvents
Loop

objIE.Document.all("q").Value = "test"   '±ý¿é¤J¤å¦r¤è¶ôªº­È¡C
objIE.Document.all("btnG").Click   '½T»{Áä

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD