Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbar with Webbrowser - possible to have web flags
#1
Hi Gintaras,

I think that the webpage that this function is bringing up assumes a "1" flag i.e. it waits and holds up the macro - i.e. can't even put in a wait-time out statement.

Is there any way to be able to put in typical web flags or at least turn off wait until web page is finished "1" flag , etc...

See below - the "oncall.edu" site sometimes needs a login and if it doesn't get it will lock up the browser - in a normal way of calling it up, I just take out the 1 flag but don't know how to do this in Toolbar with Webbrowser...


Code:
Copy      Help
/
function# hWnd message wParam lParam

sel message
    case WM_CREATE
    int h=CreateControl(0 "ActiveX" "SHDocVw.WebBrowser" 0 0 20 968 1179 hWnd 1)
    SHDocVw.WebBrowser b._getcontrol(h)
    b.Navigate("about:blank")
    b.Navigate("oncall.edu" )
    case WM_DESTROY

Thanks!!!!, Stuart
#2
Can you give a valid URL example? (oncall.edu does not exist).
#3
Hi Gintaras,
If I gave you full url, it wouldn't behave the same way because it is outside of our hospital network but if you are inside it gives a popup box:

Connect to xyz.edu/xyz

Username:
Password:


I hope this helps,

Stuart
#4
When a function (eg Navigate) forces the macro to wait, and during that time the macro must execute some code, place the code into another function and run it using mac.

Code:
Copy      Help
...
a.Navigate("about:blank")
mac "func2"
a.Navigate("somewhere") ;;waits
...

Function func2:
Code:
Copy      Help
Do something. Navigate is waiting now.

---

Or call the function (which forces the macro to wait) from another function launched using mac.

Code:
Copy      Help
...
a.Navigate("about:blank")
mac "func2"
0.1
Do something. func2 is running now.
...

Function func2:
Code:
Copy      Help
web "somewhere" 0 win("TOOLBAR_NAME_UPPERCASE" "QM_toolbar")

---

Not tested. Just hints.
#5
I am sure that will do it...Thanks so much,
Stuart


Forum Jump:


Users browsing this thread: 1 Guest(s)