Source language: Translate to:

Webbrowser Before Navigate

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Webbrowser Before Navigate

Postby Dudus » Mon Nov 28, 2016 12:41 pm

Hi folks,

i have a Webbrowser what is load a login.php webpage with Username and Password. I want to save these datas to a win Registry so i put into the Webbrowser Before Navigate Tab:

BrowserGetElement "WebBrowser2" "loginEmail" "[username]"
BrowserGetElement "WebBrowser2" "loginPass" "[password]"
RegistryWrite "HKEY_CURRENT_USER" "name" "[username]"
RegistryWrite "HKEY_CURRENT_USER" "pass" "[password]"

Than i click Login, and it is do these lines, BUT whe i Logout from the Login.php page than it is doing again these line :) so the Regsitry Write empty datas again.
How to do that the registry stay with the given datas?

Thank you!
User avatar
Posts: 118
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Re: Webbrowser Before Navigate

Postby Gaev » Mon Nov 28, 2016 3:54 pm


1) Try and log the instances when this BeforeNavigate event is triggered ... add this code in this event section ...
Code: Select all
SetVar "[BeforeNavigateLog]" "[BeforeNavigateLog][#13][#10][Time] - [Webbrowser2Addr]"

2) If the [Webbrowser2Addr] changes, then you can use it to selectively write to the Registry.

3) Otherise ...

a) you may have to setup your own "switch" ... turn it "on" before navigating to it ... turn it "off" inside the BeforeNavigate section ... and only write to the Registry if it is "on".

b) or only write to the Registry if the [username] and [password] variables are NOT null/blanks.
User avatar
Posts: 3750
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 3 guests