07-01-2011, 05:27 PM
When using a Dlg to navigate a page, sometimes the base url has to be pointing at a page so the script can log in to the website.
After that, in order to get to the actual page it would take quite a few clicks to navigate to a URL that I already know.
I've found some webpages I can start a new dialog with the URL after the previous dialog has logged in and the cookie or session will still be active so that works, but it is messy.
I guess what I am really looking for is an HTML element action that would be "Go to URL" that would be the same as typing the address into the address line and hitting go.
Here is the dialog I use:
Function WebPageDLG
After that, in order to get to the actual page it would take quite a few clicks to navigate to a URL that I already know.
I've found some webpages I can start a new dialog with the URL after the previous dialog has logged in and the cookie or session will still be active so that works, but it is messy.
I guess what I am really looking for is an HTML element action that would be "Go to URL" that would be the same as typing the address into the address line and hitting go.
Here is the dialog I use:
Function WebPageDLG
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str ax3SHD
ax3SHD="http://google.com"
hDlg=ShowDialog("WebPageDLG" &WebPageDLG &controls 0 1)
opt waitmsg 1
wait 0 -WC hDlg
;to make invisible, change 0x90C800C8 to 0x80C800C8
;BEGIN DIALOG
;0 "" 0x90C800C8 0x0 0 0 491 333 "Google"
;3 ActiveX 0x54030000 0x0 0 0 492 332 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030109 "*" "" ""
ret
;messages
SHDocVw.WebBrowser we3
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1