Webbrowser Before Navigate

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Locked
User avatar
Dudus
Posts: 120
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Webbrowser Before Navigate

Post by Dudus »

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!
D
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Webbrowser Before Navigate

Post by Gaev »

Dudus:

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.
Locked