Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

interact with user dialobbox user e passord

34 views
Skip to first unread message

sal21

unread,
May 15, 2008, 2:14:06 PM5/15/08
to
link of site:www.cerved.com
If you clic on link "Area Clienti" on the left page appear a dialogbox to
insert user e passowrd. Admit i already have var1=mypass and var2=myuser is
possiblke via code VB VBS or VBA to insert credential in this dialog box and
press ok????

Pegasus (MVP)

unread,
May 15, 2008, 2:28:46 PM5/15/08
to

"sal21" <sa...@discussions.microsoft.com> wrote in message
news:EFAA5F7F-2F82-4EF6...@microsoft.com...

You could use the "sendkeys" method of the "WScript.Shell" object.


sal21

unread,
May 16, 2008, 4:38:00 PM5/16/08
to

"Pegasus (MVP)" wrote:

Tks for suggestiopn but sure not for me...
Code?

Pegasus (MVP)

unread,
May 16, 2008, 4:49:35 PM5/16/08
to

"sal21" <sa...@discussions.microsoft.com> wrote in message
news:8ED48CF8-B646-4420...@microsoft.com...

Have a look here:
http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx


sal21

unread,
May 17, 2008, 8:51:00 AM5/17/08
to

"Pegasus (MVP)" wrote:

>
> "sal21" <sa...@discussions.microsoft.com> wrote in message
> news:8ED48CF8-B646-4420...@microsoft.com...
> >
> >
> > "Pegasus (MVP)" wrote:
> >
> >>
> >> "sal21" <sa...@discussions.microsoft.com> wrote in message
> >> news:EFAA5F7F-2F82-4EF6...@microsoft.com...
> >> > link of site:www.cerved.com
> >> > If you clic on link "Area Clienti" on the left page appear a dialogbox
> >> > to
> >> > insert user e passowrd. Admit i already have var1=mypass and
> >> > var2=myuser
> >> > is
> >> > possiblke via code VB VBS or VBA to insert credential in this dialog
> >> > box
> >> > and
> >> > press ok????
> >>
> >> You could use the "sendkeys" method of the "WScript.Shell" object.
> >>
> >>
> >>
> > Tks for suggestiopn but sure not for me...
> > Code?
>
> Have a look here:
> http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx
>
>
>

Hi Pegasus understand the sendkey command
But how intecept the dialog box to use the send key commend only respect
this dialog box?
Admit i click on Area clenti from the home page of www.cerved.com

James Whitlow

unread,
May 17, 2008, 9:15:32 AM5/17/08
to
"sal21" <sa...@discussions.microsoft.com> wrote in message
news:E310C92B-CDBB-4D35...@microsoft.com...

> Hi Pegasus understand the sendkey command
> But how intecept the dialog box to use the send key commend only respect
> this dialog box?
> Admit i click on Area clenti from the home page of www.cerved.com

Give the code below a try. It is possible this could mis-fire due to the
generic nature of the "Authentication Required" title. A more reliable
method might do to instantiate an 'InternetExplorer.Application' object in a
script and then use the 'GetRef' method to want for the click event of the
button itself.

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set oWSH = CreateObject("WScript.Shell")

sUsername = "Me"
sPassword = "Secret"

Do While Not oWSH.AppActivate("Authentication Required")
WScript.Sleep 250
Loop

oWSH.SendKeys sUsername & "{TAB}" & sPassword
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Pegasus (MVP)

unread,
May 17, 2008, 9:22:09 AM5/17/08
to

"sal21" <sa...@discussions.microsoft.com> wrote in message
news:E310C92B-CDBB-4D35...@microsoft.com...

You can write a VB script that does this:
1. Launch your browser with this page:
http://www.cerved.com/xportal/web/ita/cervedfree/cervedfree.jsp
2. Use wscript.sleep to pause for about 10 seconds.
3. Use the sendkeys method to send 21 tab keystrokes. This will
get you to the Username field.
4. Use the sendkeys method to enter your user name plus one tab.
5. Use the sendkeys method to enter your password plus one tab plus Enter.
6. Test the script from a Command Prompt.
7. Create a desktop shortcut to your script.
Alternatively: Create a shortcut in the QuickLaunch bar.

Please note: Macros are fragile. They can and will fail for many
reasons, e.g. because their execution takes longer than anticipated,
or because the web page changes, or because a virus pattern file
update box pops up while the macro is executing. I would not be
surprised if you spent much more time designing and testing this
macro that the time you spend entering your account name &
password each time.


James Whitlow

unread,
May 17, 2008, 10:32:24 AM5/17/08
to
"James Whitlow" <jwhitlow...@bloglines.com> wrote in message
news:OhIaYACu...@TK2MSFTNGP04.phx.gbl...

> "sal21" <sa...@discussions.microsoft.com> wrote in message
> news:E310C92B-CDBB-4D35...@microsoft.com...
>> Hi Pegasus understand the sendkey command
>> But how intecept the dialog box to use the send key commend only respect
>> this dialog box?
>> Admit i click on Area clenti from the home page of www.cerved.com

Ignore my last post! The "Authentication Required" title only appears
when using Firefox. You can make it work by changing "Authentication
Required" to "Connect to www.cerved.com" on line 6, but the code below will
probably work better since it will launch Internet Explorer, navigate to the
site & then fill in the form.

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set oIE = CreateObject("InternetExplorer.Application")


Set oWSH = CreateObject("WScript.Shell")

sUsername = "Me"
sPassword = "Secret"

oIE.Visible = True
oIE.Navigate "https://www.cerved.com/xportal/web/ita/protected" _
& "/abbonati/menu_abbonati.jsp"

Do While Not oWSH.AppActivate("Connect to www.cerved.com")
WScript.Sleep 250
Loop

oWSH.SendKeys sUsername & "{TAB}" & sPassword & "{ENTER}"
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


sal21

unread,
May 17, 2008, 1:00:00 PM5/17/08
to

"Pegasus (MVP)" wrote:

hi Pegasus e and James...
MI brain is fired i have tested all hour script but withiot success.
Please help............
But have you tested your script on officila site www.cerved.com link Area
Clienti....

sal21

unread,
May 17, 2008, 1:06:01 PM5/17/08
to

"Pegasus (MVP)" wrote:

ahhhhhhhhhh... for test use Explorer because all users use this browser!

Pegasus (MVP)

unread,
May 17, 2008, 1:47:33 PM5/17/08
to

"sal21" <sa...@discussions.microsoft.com> wrote in message
news:41D71985-7843-4323...@microsoft.com...

Let's have a look at your script!


Todd Vargo

unread,
May 18, 2008, 12:39:35 AM5/18/08
to
sal21 wrote:
> ahhhhhhhhhh... for test use Explorer because all users use this browser!

Over quoting is contagious...
http://lipas.uwasa.fi/~ts/http/quote.html

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

0 new messages