Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
InitWeb and Login
#1
Hi guys,

Is there a way of login a website using InitFromWeb?

I need to get a info from the site below, but it demands User and Password.

Macro Macro6
Code:
Copy      Help
HtmlDoc d
d.SetOptions(2)
d.InitFromWeb("https://www.quandl.com/sign-up-modal")
#2
Try to login manually using a dialog with a web browser control.
For example, this macro is for this forum, gets the User CP page.

Macro Macro296
Code:
Copy      Help
out

;retry
HtmlDoc d
d.SetOptions(2)
d.InitFromWeb("http://www.quickmacros.com/forum/usercp.php")
str s=d.GetText
out s
if find(s "You are either not logged in")>=0
,if(!DialogWithWebBrowserControl("http://www.quickmacros.com/forum/")) ret ;;in this page login manually. If there is a checkbox like "Remember me", let it be checked.
,goto retry

;...

Function DialogWithWebBrowserControl
Code:
Copy      Help
function! $url

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 696 376 "Dialog" "4"
;3 ActiveX 0x54030000 0x0 0 0 696 350 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;1 Button 0x54030001 0x4 8 356 48 14 "OK"
;2 Button 0x54030000 0x4 64 356 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040802 "*" "" "" ""

str controls = "3"
str ax3SHD
ax3SHD=url
ret ShowDialog(dd &sub.DlgProc &controls)


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#3
You are outstanding, man!

Thanks a lot!


Forum Jump:


Users browsing this thread: 1 Guest(s)