Thanks a lot SROD
You are a mother for me
You are perhaps proud of me,....... because KCC not turn round his thumb since last question, i ask to you
I have found a solution for clik on the button
I put her, if you are interesting or if somebody need to buy automatically to Ebay a day, in the same time that he sleep
For click on the left button "S'inscrire"
Code: Select all
ExecuteJavaScriptGadget(#WebGadget, "document.forms[0].submit()")
For click on the right button "Ouvrir une session"
Code: Select all
ExecuteJavaScriptGadget(#WebGadget, "document.forms[1].submit()")
This is your splendid code bad modify by KCC for open your account, if obviously you have a account in EBAY France
Code: Select all
;/////////////////////////////////////////////////////////////////////////////////
;***COMate*** COM automation through iDispatch.
;*===========
;*
;*Execute JavaScript in WebGadget demo by Timo Harter (Freak), Ricardo and Stephen Rodriguez.
;/////////////////////////////////////////////////////////////////////////////////
IncludePath "..\"
XIncludeFile "COMate.pbi"
Enumeration
#FormWeb
#WebGadget
EndEnumeration
Procedure Waiting()
Define.COMateObject WebObject
WebObject = COMate_WrapCOMObject(GetWindowLong_(GadgetID(#WebGadget), #GWL_USERDATA))
status=-1
If WebObject
While Status
While WindowEvent():Delay(1):Wend
Status = WebObject\GetIntegerProperty("Busy")
Wend
WebObject\Release()
EndIf
EndProcedure
Procedure.i ExecuteJavaScript(Gadget, Command$)
Protected browser.COMateObject,documentDispatch.COMateObject, script.COMateObject
Protected result
browser = COMate_WrapCOMObject(GetWindowLong_(GadgetID(Gadget), #GWL_USERDATA))
If browser
documentDispatch = browser\GetObjectProperty("Document")
If documentDispatch
script = documentDispatch\GetObjectProperty("script")
If script
result = script\Invoke("eval('" + command$ + "')")
If Result < 0
Debug COMate_GetLastErrorDescription()
EndIf
script\release()
EndIf
documentDispatch\Release()
EndIf
browser\Release()
EndIf
ProcedureReturn result
EndProcedure
OpenWindow(#FormWeb, 0, 0, 800, 600, "", #PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
WebGadget(#WebGadget, 10, 10, WindowWidth(#FormWeb) - 20, WindowHeight(#FormWeb) - 60, "")
SetGadgetText(#WebGadget, "https://signin.ebay.fr/ws/eBayISAPI.dll?SignIn&UsingSSL=1&pUserId=&co_partnerId=2&siteid=71&ru=http%3A%2F%2Fcgi5.ebay.fr%2Fws2%2FeBayISAPI.dll%3FSellItem%26hm%3Dnu.s5tjbhnm575%26%26hc%3D1%26guest%3D1&pageType=1144")
Waiting()
ExecuteJavaScript(#WebGadget, "document.all.userid.value=" + Chr(34) + "xxxxx" + Chr(34)) ; <====== Change for your username
ExecuteJavaScript(#WebGadget, "document.all.pass.value=" + Chr(34) + "xxxxx" + Chr(34)) ; <====== Change for your password
Waiting()
ExecuteJavaScript(#WebGadget, "document.forms[1].submit()")
Repeat
Evenement = WaitWindowEvent ()
Until Evenement = #PB_Event_CloseWindow
Again thanks my good SROD
You and me it's the dream team
