The code below I have run since years ago when I got it from Dave Crozier here on ProFox. I think it's a firewall issue. The oIE.Navigate command returns .NULL. Your thoughts as to what it might be? He's got IE11 on his machine. I went into IE11 and it works fine.
(BIG THANKS to Ed for the vRunFox that is helping me remote sleuth this issue!)
* Taken from http://leafe.com/archives/msg/493379, courtesy Dave Crozier for the ProFox post!! WAIT WINDOW TIMEOUT 1 "Retrieving IP address for security verification...please wait." LOCAL oIE as InternetExplorer.Application, nStart as Number TRY oIE = createobject("internetexplorer.application") CATCH TO loException llFail = .T. lcIP = 'error' this.Alert(loException.Message,16,"Could not invoke Internet Explorer",.T.) ENDTRY IF NOT llFail THEN *** mjb 06/16/2020 - added TRY TRY oIE.Navigate("http://www.atoutfox.org/ip.asp") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.nameprop() ENDIF CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with first IP site") ENDTRY
TRY IF EMPTY(lcIP) THEN && try the alternative site per Stephen Russell oIE.Navigate("http://ipecho.net/plain") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.body.innerHTML ENDIF ENDIF && EMPTY(lcIP) RELEASE oIE CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with second IP site") ENDTRY ENDIF && NOT llFail
If the createobject is failing, my first guess is there's something wrong with the way the OLE object is registered (or not). Or perhaps a user security issue.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Tuesday, June 16, 2020 6:01 PM To: profoxtech@leafe.com Subject: This code doesn't work on this guy's new HP machine (but works on his own machine) -- both Win10 -- maybe a firewall issue?
The code below I have run since years ago when I got it from Dave Crozier here on ProFox. I think it's a firewall issue. The oIE.Navigate command returns .NULL. Your thoughts as to what it might be? He's got IE11 on his machine. I went into IE11 and it works fine.
(BIG THANKS to Ed for the vRunFox that is helping me remote sleuth this issue!)
* Taken from http://leafe.com/archives/msg/493379, courtesy Dave Crozier for the ProFox post!! WAIT WINDOW TIMEOUT 1 "Retrieving IP address for security verification...please wait." LOCAL oIE as InternetExplorer.Application, nStart as Number TRY oIE = createobject("internetexplorer.application") CATCH TO loException llFail = .T. lcIP = 'error' this.Alert(loException.Message,16,"Could not invoke Internet Explorer",.T.) ENDTRY IF NOT llFail THEN *** mjb 06/16/2020 - added TRY TRY oIE.Navigate("http://www.atoutfox.org/ip.asp") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.nameprop() ENDIF CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with first IP site") ENDTRY
TRY IF EMPTY(lcIP) THEN && try the alternative site per Stephen Russell oIE.Navigate("http://ipecho.net/plain") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.body.innerHTML ENDIF ENDIF && EMPTY(lcIP) RELEASE oIE CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with second IP site") ENDTRY ENDIF && NOT llFail
No the createobject seemed to work. It's the NAVIGATE call that just kept returning NULL.
I even opened the firewall for my app plus vRunFox.exe. Plus ran as Administrator. No difference.
On 6/16/2020 6:08 PM, Richard Kaye wrote:
If the createobject is failing, my first guess is there's something wrong with the way the OLE object is registered (or not). Or perhaps a user security issue.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Tuesday, June 16, 2020 6:01 PM To: profoxtech@leafe.com Subject: This code doesn't work on this guy's new HP machine (but works on his own machine) -- both Win10 -- maybe a firewall issue?
The code below I have run since years ago when I got it from Dave Crozier here on ProFox. I think it's a firewall issue. The oIE.Navigate command returns .NULL. Your thoughts as to what it might be? He's got IE11 on his machine. I went into IE11 and it works fine.
(BIG THANKS to Ed for the vRunFox that is helping me remote sleuth this issue!)
* Taken from http://leafe.com/archives/msg/493379, courtesy Dave Crozier for the ProFox post!! WAIT WINDOW TIMEOUT 1 "Retrieving IP address for security verification...please wait." LOCAL oIE as InternetExplorer.Application, nStart as Number TRY oIE = createobject("internetexplorer.application") CATCH TO loException llFail = .T. lcIP = 'error' this.Alert(loException.Message,16,"Could not invoke Internet Explorer",.T.) ENDTRY IF NOT llFail THEN *** mjb 06/16/2020 - added TRY TRY oIE.Navigate("http://www.atoutfox.org/ip.asp") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.nameprop() ENDIF CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with first IP site") ENDTRY
TRY IF EMPTY(lcIP) THEN && try the alternative site per Stephen Russell oIE.Navigate("http://ipecho.net/plain") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.body.innerHTML ENDIF ENDIF && EMPTY(lcIP) RELEASE oIE CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with second IP site") ENDTRY ENDIF && NOT llFail
Sorry, Mike. I misread the point at which the error happened. Ignore me. You've got wOOdy (and others!) helping you now anyway and that's better.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Wednesday, June 17, 2020 1:18 AM To: profoxtech@leafe.com Subject: Re: This code doesn't work on this guy's new HP machine (but works on his own machine) -- both Win10 -- maybe a firewall issue?
No the createobject seemed to work. It's the NAVIGATE call that just kept returning NULL.
I even opened the firewall for my app plus vRunFox.exe. Plus ran as Administrator. No difference.
On 6/17/2020 1:23 PM, Richard Kaye wrote:
Sorry, Mike. I misread the point at which the error happened. Ignore me. You've got wOOdy (and others!) helping you now anyway and that's better.
https://www.youtube.com/watch?v=EeJVTimlyWk
lol
😊
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Wednesday, June 17, 2020 2:53 PM To: profoxtech@leafe.com Subject: Re: This code doesn't work on this guy's new HP machine (but works on his own machine) -- both Win10 -- maybe a firewall issue?
On 6/17/2020 1:23 PM, Richard Kaye wrote:
Sorry, Mike. I misread the point at which the error happened. Ignore me. You've got wOOdy (and others!) helping you now anyway and that's better.
I second the comment about vRunFox!!
John Weller 01380 723235 07976 393631
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: 16 June 2020 23:01 To: profoxtech@leafe.com Subject: This code doesn't work on this guy's new HP machine (but works on his own machine) -- both Win10 -- maybe a firewall issue?
The code below I have run since years ago when I got it from Dave Crozier here on ProFox. I think it's a firewall issue. The oIE.Navigate command returns .NULL. Your thoughts as to what it might be? He's got IE11 on his machine. I went into IE11 and it works fine.
(BIG THANKS to Ed for the vRunFox that is helping me remote sleuth this issue!)
* Taken from http://leafe.com/archives/msg/493379, courtesy Dave Crozier for the ProFox post!! WAIT WINDOW TIMEOUT 1 "Retrieving IP address for security verification...please wait." LOCAL oIE as InternetExplorer.Application, nStart as Number TRY oIE = createobject("internetexplorer.application") CATCH TO loException llFail = .T. lcIP = 'error' this.Alert(loException.Message,16,"Could not invoke Internet Explorer",.T.) ENDTRY IF NOT llFail THEN *** mjb 06/16/2020 - added TRY TRY oIE.Navigate("http://www.atoutfox.org/ip.asp") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.nameprop() ENDIF CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with first IP site") ENDTRY
TRY IF EMPTY(lcIP) THEN && try the alternative site per Stephen Russell oIE.Navigate("http://ipecho.net/plain") nStart = SECONDS() DO WHILE oIE.ReadyState<>4 AND (seconds()-nStart) <= IP_TIMEOUT DOEVENTS ENDDO IF oIE.ReadyState<>4 lcIP = "" && "0.0.0.0" ELSE lcIP = oIE.document.body.innerHTML ENDIF ENDIF && EMPTY(lcIP) RELEASE oIE CATCH TO loException MESSAGEBOX(loException.Message,16,"Problem with second IP site") ENDTRY ENDIF && NOT llFail