-
I hire best vb6 programmer here, buget $500-$1000
I have a project that need execute javascript with inet control in vb6
i wana hire good vb6 programmer here who can do the task
budget: $500-$1000
payment: paypal or btc or any other payment method u prefer
my skype: pblastz
also send me pm with ur skype or contact info.
-
Re: I hire best vb6 programmer here, buget $500-$1000
Maybe you should provide some more detail as to what you are looking for in terms of coding/functionality.
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
DataMiser
Maybe you should provide some more detail as to what you are looking for in terms of coding/functionality.
code to execute javascript using inet control
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
geekmaro
code to execute javascript using inet control
That tells me pretty much nothing at all. As I said details would help. From your description you could be talking 1 line of code or 100,000 lines.
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
DataMiser
That tells me pretty much nothing at all. As I said details would help. From your description you could be talking 1 line of code or 100,000 lines.
please check ur inbox
-
Re: I hire best vb6 programmer here, buget $500-$1000
in website source code i have the following:
javascript: previewpopup('1')
javascript: previewpopup('2')
javascript: previewpopup('3')
i need to execute this javascript code in inet control
-
Re: I hire best vb6 programmer here, buget $500-$1000
This looks like it will need a custom IDocHostUIHandler to return an VB6 object on `GetExternal` so the JS part can interface with something like `window.external.previewpopup('1')`
Doable but this is going to be tricky and hard to debug implementation requiring a custom .tlb, a bit of multi-threading and probably interface hooking on the VB6 container the std web browser control is sited on.
Here is an old gist with a barebone sample that won't compile as some dependencies are missing.
cheers,
</wqw>
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
wqweto
Doable but this is going to be tricky and hard to debug implementation requiring a custom .tlb, a bit of multi-threading and probably interface hooking on the VB6 container the std web browser control is sited on.
An alternative (and much easier) approach would be, to add your own JS-Functions and -Properties/Vars into the WebBrowser-Controls DOM -
and then execute these JS-snippets over the WB.Document.Script-Object from the VB-side...
What many are not aware of is, that you can e.g. define a js-Variable with public scope - and then set it from outside the WB-Control to a VB-Object.
This js-Variable will then behave entirely normal inside JS - and allows easy to undertake Property- and Method-interactions with e.g. your VB-Form
(without resorting to Event-Bindings, which are also possible of course).
Here is an example (needs a Form with a Command1 and a WebBrowser1):
Code:
Option Explicit
Private script As Object
Private Sub Form_Load()
WebBrowser1.Navigate2 "about:blank"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
Set script = WebBrowser1.Document.script
JsAdd "var oHost;"
Set JsProp("oHost") = Me
JsAdd "function reflect(p){return p}" 'just a plain JS-function, which returns the passed Arg as a result
JsAdd "function hostSetCaption(p){oHost.Caption = p}" 'Property-Access of the HostObj from inside JS
JsAdd "function hostCallMethod(p){oHost.DoSomeThingWith(p)}" 'a MethodCall on the HostObj from inside JS
End Sub
Private Sub Command1_Click()
Debug.Print "JsRun -> reflect: ", JsRun("reflect", "Hello")
Debug.Print "JsProp -> oHost.Caption: ", JsProp("oHost").Caption
JsRun "hostSetCaption", "Hello" 'should result in a change of our Forms Caption
JsRun "hostCallMethod", "Param, passed to the host-defined function from inside JS"
End Sub
Public Sub DoSomeThingWith(p) 'this public Method is accessible from inside JS as well (not only the default Form-Methods/Props)
MsgBox p
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set JsProp("oHost") = Nothing 'just to make sure, we cleanup a potential circle-ref
End Sub
'a small set of simple Helper-Routines for JS-Interaction
Public Sub JsAdd(code As String)
CallByName JsProp("window"), "execScript", VbMethod, code
End Sub
Public Property Get JsProp(propName As String)
VarCopy JsProp, CallByName(script, propName, VbGet)
End Property
Public Property Let JsProp(propName As String, RHS)
CallByName script, propName, VbLet, RHS
End Property
Public Property Set JsProp(propName As String, RHS)
CallByName script, propName, VbSet, RHS
End Property
Public Function JsRun(funcName As String, ParamArray p())
Select Case UBound(p) + 1
Case 0: VarCopy JsRun, CallByName(script, funcName, VbMethod)
Case 1: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0))
Case 2: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1))
Case 3: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2))
Case 4: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2), p(3))
End Select
End Function
Private Sub VarCopy(Dst, Src)
If IsObject(Src) Then Set Dst = Src Else Dst = Src
End Sub
Olaf
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Schmidt
An alternative (and much easier) approach would be, to add your own JS-Functions and -Properties/Vars into the WebBrowser-Controls DOM -
and then execute these JS-snippets over the WB.Document.Script-Object from the VB-side...
What many are not aware of is, that you can e.g. define a js-Variable with public scope - and then set it from outside the WB-Control to a VB-Object.
This js-Variable will then behave entirely normal inside JS - and allows easy to undertake Property- and Method-interactions with e.g. your VB-Form
(without resorting to Event-Bindings, which are also possible of course).
Here is an example (needs a Form with a Command1 and a WebBrowser1):
Code:
Option Explicit
Private script As Object
Private Sub Form_Load()
WebBrowser1.Navigate2 "about:blank"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
Set script = WebBrowser1.Document.script
JsAdd "var oHost;"
Set JsProp("oHost") = Me
JsAdd "function reflect(p){return p}" 'just a plain JS-function, which returns the passed Arg as a result
JsAdd "function hostSetCaption(p){oHost.Caption = p}" 'Property-Access of the HostObj from inside JS
JsAdd "function hostCallMethod(p){oHost.DoSomeThingWith(p)}" 'a MethodCall on the HostObj from inside JS
End Sub
Private Sub Command1_Click()
Debug.Print "JsRun -> reflect: ", JsRun("reflect", "Hello")
Debug.Print "JsProp -> oHost.Caption: ", JsProp("oHost").Caption
JsRun "hostSetCaption", "Hello" 'should result in a change of our Forms Caption
JsRun "hostCallMethod", "Param, passed to the host-defined function from inside JS"
End Sub
Public Sub DoSomeThingWith(p) 'this public Method is accessible from inside JS as well (not only the default Form-Methods/Props)
MsgBox p
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set JsProp("oHost") = Nothing 'just to make sure, we cleanup a potential circle-ref
End Sub
'a small set of simple Helper-Routines for JS-Interaction
Public Sub JsAdd(code As String)
CallByName JsProp("window"), "execScript", VbMethod, code
End Sub
Public Property Get JsProp(propName As String)
VarCopy JsProp, CallByName(script, propName, VbGet)
End Property
Public Property Let JsProp(propName As String, RHS)
CallByName script, propName, VbLet, RHS
End Property
Public Property Set JsProp(propName As String, RHS)
CallByName script, propName, VbSet, RHS
End Property
Public Function JsRun(funcName As String, ParamArray p())
Select Case UBound(p) + 1
Case 0: VarCopy JsRun, CallByName(script, funcName, VbMethod)
Case 1: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0))
Case 2: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1))
Case 3: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2))
Case 4: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2), p(3))
End Select
End Function
Private Sub VarCopy(Dst, Src)
If IsObject(Src) Then Set Dst = Src Else Dst = Src
End Sub
Olaf
That's pretty cool. Seems I remember coming across this some time ago, but had long since forgotten it. Not exactly a common thing to try. I tip my hat at your ingenuity, sir.
The only things I see are: 1) he's making a requirement that the js be run through INet control - not sure I get why, but there it is. Maybe it's not a hard and fast requirement. And 2) I'm not sure he's in possession or control of the js script, which means it's hosted remotely, will this still work in such case?
-tg
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
techgnome
1) he's making a requirement that the js be run through INet control - not sure I get why, but there it is.
Not sure what you mean exactly, but the example demonstrates, how to add your own (additional) js into the WB-Control -
and it should not be that difficult to re-route certain existing JS-functions over your own (newly added) snippets...
Quote:
Originally Posted by
techgnome
2) I'm not sure he's in possession or control of the js script, which means it's hosted remotely, will this still work in such case?
When we talk about DOM-interaction, then there isn't really any "remotely hosted" (as in "remotely run") JS.
What often sits remotely, are only the js-resources, and these are always downloaded into the DOM before a given Browser can execute them
(in the context of the Page in question).
And yes, your own added JS-snippets can run in conjunction with pre-existing (externally loaded) js-Resources in the context of a given external Page.
Olaf
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Schmidt
An alternative (and much easier) approach would be, to add your own JS-Functions and -Properties/Vars into the WebBrowser-Controls DOM -
and then execute these JS-snippets over the WB.Document.Script-Object from the VB-side...
What many are not aware of is, that you can e.g. define a js-Variable with public scope - and then set it from outside the WB-Control to a VB-Object.
This js-Variable will then behave entirely normal inside JS - and allows easy to undertake Property- and Method-interactions with e.g. your VB-Form
(without resorting to Event-Bindings, which are also possible of course).
Here is an example (needs a Form with a Command1 and a WebBrowser1):
Code:
Option Explicit
Private script As Object
Private Sub Form_Load()
WebBrowser1.Navigate2 "about:blank"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
Set script = WebBrowser1.Document.script
JsAdd "var oHost;"
Set JsProp("oHost") = Me
JsAdd "function reflect(p){return p}" 'just a plain JS-function, which returns the passed Arg as a result
JsAdd "function hostSetCaption(p){oHost.Caption = p}" 'Property-Access of the HostObj from inside JS
JsAdd "function hostCallMethod(p){oHost.DoSomeThingWith(p)}" 'a MethodCall on the HostObj from inside JS
End Sub
Private Sub Command1_Click()
Debug.Print "JsRun -> reflect: ", JsRun("reflect", "Hello")
Debug.Print "JsProp -> oHost.Caption: ", JsProp("oHost").Caption
JsRun "hostSetCaption", "Hello" 'should result in a change of our Forms Caption
JsRun "hostCallMethod", "Param, passed to the host-defined function from inside JS"
End Sub
Public Sub DoSomeThingWith(p) 'this public Method is accessible from inside JS as well (not only the default Form-Methods/Props)
MsgBox p
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set JsProp("oHost") = Nothing 'just to make sure, we cleanup a potential circle-ref
End Sub
'a small set of simple Helper-Routines for JS-Interaction
Public Sub JsAdd(code As String)
CallByName JsProp("window"), "execScript", VbMethod, code
End Sub
Public Property Get JsProp(propName As String)
VarCopy JsProp, CallByName(script, propName, VbGet)
End Property
Public Property Let JsProp(propName As String, RHS)
CallByName script, propName, VbLet, RHS
End Property
Public Property Set JsProp(propName As String, RHS)
CallByName script, propName, VbSet, RHS
End Property
Public Function JsRun(funcName As String, ParamArray p())
Select Case UBound(p) + 1
Case 0: VarCopy JsRun, CallByName(script, funcName, VbMethod)
Case 1: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0))
Case 2: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1))
Case 3: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2))
Case 4: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2), p(3))
End Select
End Function
Private Sub VarCopy(Dst, Src)
If IsObject(Src) Then Set Dst = Src Else Dst = Src
End Sub
Olaf
Your check for $1,000 is in the mail
He just needs your zip code
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Spooman
Your check for $1,000 is in the mail
He just needs your zip code
I know we call it German zip codes, but I wonder if they call them zip codes, since the word for the postal code is Postleitzahl and abbreviated PLZ.
Its a Pleeze code, as in please deliver the mail.
-
Re: I hire best vb6 programmer here, buget $500-$1000
[QUOTE=Schmidt;5228973]An alternative (and much easier) approach would be, to add your own JS-Functions and -Properties/Vars into the WebBrowser-Controls DOM -
and then execute these JS-snippets over the WB.Document.Script-Object from the VB-side...
What many are not aware of is, that you can e.g. define a js-Variable with public scope - and then set it from outside the WB-Control to a VB-Object.
This js-Variable will then behave entirely normal inside JS - and allows easy to undertake Property- and Method-interactions with e.g. your VB-Form
(without resorting to Event-Bindings, which are also possible of course).
Here is an example (needs a Form with a Command1 and a WebBrowser1):
Code:
Option Explicit
Private script As Object
Private Sub Form_Load()
WebBrowser1.Navigate2 "about:blank"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
Set script = WebBrowser1.Document.script
JsAdd "var oHost;"
Set JsProp("oHost") = Me
JsAdd "function reflect(p){return p}" 'just a plain JS-function, which returns the passed Arg as a result
JsAdd "function hostSetCaption(p){oHost.Caption = p}" 'Property-Access of the HostObj from inside JS
JsAdd "function hostCallMethod(p){oHost.DoSomeThingWith(p)}" 'a MethodCall on the HostObj from inside JS
End Sub
Private Sub Command1_Click()
Debug.Print "JsRun -> reflect: ", JsRun("reflect", "Hello")
Debug.Print "JsProp -> oHost.Caption: ", JsProp("oHost").Caption
JsRun "hostSetCaption", "Hello" 'should result in a change of our Forms Caption
JsRun "hostCallMethod", "Param, passed to the host-defined function from inside JS"
End Sub
Public Sub DoSomeThingWith(p) 'this public Method is accessible from inside JS as well (not only the default Form-Methods/Props)
MsgBox p
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set JsProp("oHost") = Nothing 'just to make sure, we cleanup a potential circle-ref
End Sub
'a small set of simple Helper-Routines for JS-Interaction
Public Sub JsAdd(code As String)
CallByName JsProp("window"), "execScript", VbMethod, code
End Sub
Public Property Get JsProp(propName As String)
VarCopy JsProp, CallByName(script, propName, VbGet)
End Property
Public Property Let JsProp(propName As String, RHS)
CallByName script, propName, VbLet, RHS
End Property
Public Property Set JsProp(propName As String, RHS)
CallByName script, propName, VbSet, RHS
End Property
Public Function JsRun(funcName As String, ParamArray p())
Select Case UBound(p) + 1
Case 0: VarCopy JsRun, CallByName(script, funcName, VbMethod)
Case 1: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0))
Case 2: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1))
Case 3: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2))
Case 4: VarCopy JsRun, CallByName(script, funcName, VbMethod, p(0), p(1), p(2), p(3))
End Select
End Function
Private Sub VarCopy(Dst, Src)
If IsObject(Src) Then Set Dst = Src Else Dst = Src
End Sub
thank u for the code, however it only displayed msg "Param, passed to the host-defined function from inside JS"
i need to execute
javascript: previewpopup('1')
javascript: previewpopup('2')
javascript: previewpopup('3')
how can i do this please help
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Spooman
Your check for $1,000 is in the mail
He just needs your zip code
But OP needs to access this VB6 host object in $(document).ready loading data an stuff :-))
cheers,
</wqw>
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
wqweto
But OP needs to access this VB6 host object in $(document).ready loading data an stuff :-))
Then you know more than me ... (and just to make sure, I'm not "competing for the Job" here)
But there's quite a lot of possibilities which come to mind, as e.g.:
- delaying the "critical action" by a js-timer-function (with a large enough timespan to beam the VB-HelperObject into the js-context in-between)
- or buffering the input-data for these PopUps in public js-Variables - and use them later (after the document-load went through) from the VB-Host
- or putting a selfwritten little Proxy inbetween, which would allow for "dynamic rewrites/replacements" of the critical js-parts at download-time
- or working with IFrames (with the js-VBHostObject already in place and waiting in the Main-Document)
- or downloading the Page priorily over a "headless" http-Request-Object, doing the needed js-replacements - then re-loading the changed Doc into the WB-Control
.. (one might need to disable "cross-site-scripting-prevention" in the IE-Control temporarily for that, but this is possible with an App-specific IE-feature-setting I think)
Much of the above depends, on dynamically changing sections of the original js-Code...
But maybe there's even "static access" possible on the documents js-Code (if the OP is the author and has access to the server) -
who knows... ;)
Olaf
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Schmidt
Then you know more than me ... (and just to make sure, I'm not "competing for the Job" here)
But there's quite a lot of possibilities which come to mind, as e.g.:
- delaying the "critical action" by a js-timer-function (with a large enough timespan to beam the VB-HelperObject into the js-context in-between)
- or buffering the input-data for these PopUps in public js-Variables - and use them later (after the document-load went through) from the VB-Host
- or putting a selfwritten little Proxy inbetween, which would allow for "dynamic rewrites/replacements" of the critical js-parts at download-time
- or working with IFrames (with the js-VBHostObject already in place and waiting in the Main-Document)
- or downloading the Page priorily over a "headless" http-Request-Object, doing the needed js-replacements - then re-loading the changed Doc into the WB-Control
.. (one might need to disable "cross-site-scripting-prevention" in the IE-Control temporarily for that, but this is possible with an App-specific IE-feature-setting I think)
Much of the above depends, on dynamically changing sections of the original js-Code...
But maybe there's even "static access" possible on the documents js-Code (if the OP is the author and has access to the server) -
who knows... ;)
Olaf
thank u for the code, however it only displayed msg "Param, passed to the host-defined function from inside JS"
i need to execute
javascript: previewpopup('1')
javascript: previewpopup('2')
javascript: previewpopup('3')
how can i do this please help
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
geekmaro
thank u for the code, however it only displayed msg "Param, passed to the host-defined function from inside JS"
i need to execute
javascript: previewpopup('1')
javascript: previewpopup('2')
javascript: previewpopup('3')
how can i do this please help
Without more background-info, I fear we cannot help.
the called "previewpopup" is certainly not part of the ECMA-js-standard - and when I google
for that term, there's also no hints that it's being part of jQuery or other larger js-FrameWorks.
Just looked up a few prior postings of yours - is this by chance related to
the site: "sendspace.com" (which you mentioned in one of them)?
If yes, that site has a proper WebAPI (to up- and download files) - so if interactions with that website
is what you're trying to accomplish in the end, then I'd suggest solving your problems over said WebAPI.
Olaf
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Schmidt
Without more background-info, I fear we cannot help.
the called "previewpopup" is certainly not part of the ECMA-js-standard - and when I google
for that term, there's also no hints of that, being part of jQuery or other larger js-FrameWorks.
Just looked up a few prior postings of yours - is this by chance related to
the site: "sendspace.com" (which you mentioned in one of them)?
If yes, that site has a proper WebAPI (to up- and download files) - so if interactions with that website
is what you're trying to accomplish in the end, then I'd suggest solving your problems over said WebAPI.
Olaf
i offer u $1000 to do project for me :)
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
geekmaro
i offer u $1000 to do project for me :)
Sounds like a fair price - for a one- (max two) day-project, but since the concrete task at hand
is not really specified, nobody can seriously estimate the required amount of needed work/time.
Olaf
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
Schmidt
Sounds like a fair price - for a one- (max two) day-project, but since the concrete task at hand
is not really specified, nobody can seriously estimate the required amount of needed work/time.
Olaf
i asked you in a private msg for ur contact info to write u about project details
please check in ur inbox
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
geekmaro
i asked you in a private msg for ur contact info to write u about project details
please check in ur inbox
Yep - and I already wrote that I don't have the time, to make an attempt, sorry...
At least a rough (publically readable) project-description would be helpful,
to spur a bit more interest in potentially interested parties (just saying)...
Olaf
-
Re: I hire best vb6 programmer here, buget $500-$1000
JUst guessing, if the idea, is to read "sponsors ads popups", as valid browsed/clicked by human!, your idea won't work.
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
flyguille
JUst guessing, if the idea, is to read "sponsors ads popups", as valid browsed/clicked by human!, your idea won't work.
no i only need to click javascript link using inet
if u wana earn $1000 easily, send me ur contact info to my pm
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
geekmaro
no i only need to click javascript link using inet
if u wana earn $1000 easily, send me ur contact info to my pm
you know that javascript code is received compiled from the webserver, right?
I mean, the Inet control, can GET any URL , the webserver send all the HTML in plain text, you can grab it and store as a file.
A normal browser, will see the javascript TAGs from the HTML, grab the url of the java file, and send a new GET for the JS file.
and then grab the file content, but it is COMPILED, and it is expected to be run in the JS engine. You can't see the source code.
So, what do you want, it to show in a screen?, then to simulate human behaviour and control the mouse pointer to do the click?, ... it won't be "in background", it will be FOCUS MOST TOP form, showed in the screen.
-----
Oh, no I am describing, old style java addon!.
if it is scripted inserted in the html, and if in chrome with F12, you can see the code, I can do that easyly.
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
flyguille
you know that javascript code is received compiled from the webserver, right?
I mean, the Inet control, can GET any URL , the webserver send all the HTML in plain text, you can grab it and store as a file.
A normal browser, will see the javascript TAGs from the HTML, grab the url of the java file, and send a new GET for the JS file.
and then grab the file content, but it is COMPILED, and it is expected to be run in the JS engine. You can't see the source code.
So, what do you want, it to show in a screen?, then to simulate human behaviour and control the mouse pointer to do the click?, ... it won't be "in background", it will be FOCUS MOST TOP form, showed in the screen.
-----
Oh, no I am describing, old style java addon!.
if it is scripted inserted in the html, and if in chrome with F12, you can see the code, I can do that easyly.
i sent u pm, check ur inbox please
-
Re: I hire best vb6 programmer here, buget $500-$1000
Quote:
Originally Posted by
geekmaro
i sent u pm, check ur inbox please
replied.