Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dlg Webpage redirect
#1
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
Code:
Copy      Help
\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
#2
Code:
Copy      Help
,we3._getcontrol(id(3 hDlg))
,we3.Navigate("url")
#3
I should have asked this question sooner! I've been messing around with so many mickey mouse ways of doing this and it was that simple.

This goes to prove, there is no such thing as a stupid question! So glad to have this out in the open!

Now I can navigate pages on the fly. This will dump so many clicks and errors out of my pages!

If only more sites used scripts with query strings. I could call up data like a command line interface!

-jim


Forum Jump:


Users browsing this thread: 1 Guest(s)