Source language: Translate to:

Questions about the SendKeys command

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Re: Questions about the SendKeys command

Postby Enigman » Thu Sep 25, 2014 1:06 pm

I bet u can pick some good ideas from this article

Interesting ... I look into that info in more detail.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Questions about the SendKeys command

Postby Enigman » Thu Sep 25, 2014 1:10 pm

Tony Kroos wrote:also there's no point in security when the user "securely" gets login-password into login form and then uses a non-SSLsecured regular HTTP connection...

Uh, well, SSL depends on the site in the browser that the U & P is being pushed to. If a user logs into a non-SSL form, then we're back to what I said before. The user must adopt at least a minimum of security awareness.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Questions about the SendKeys command

Postby stevec » Fri Sep 26, 2014 2:52 pm

I use the send key command to ensure that certain fields are populated with the correct data.

I have a popup message that uses the delay function to allow the users to click in the app, it works.


lgaMessageBox "CD Key ready is ready to be copied" "you'll have four seconds to click on the CD Key dialog box, before the key is copied. Click 'OK' when you are ready. " "2" "0"

Delay "4000"
SendKeys "" "XXXXX"
Delay "250"
.SendKeys "" "{Tab}"
Delay "250"
SendKeys "" "XXXXX"
Delay "250"
.SendKeys "" "{Tab}"
Delay "250"
SendKeys "" "XXXXX"
Delay "250"
.SendKeys "" "{Tab}"
Delay "250"
SendKeys "" "XXXXX"
Delay "250"
.SendKeys "" "{Tab}"
Delay "250"
SendKeys "" "XXXXX"

Then, I have had to the use the {Tab} {Tab} in some cases.
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Re: Questions about the SendKeys command

Postby Enigman » Fri Sep 26, 2014 4:03 pm

If FireFox (for whatever reason) doesn't remember which control has the focus, then there probably isn't anything you can do about it.
Have you tried IE or Chrome?

Okay then, well ... I have implemented a feature that allows the user to specify which browser they use by default, so that SendKeys will coordinate with the default. That establishes a target ID that I keep in a variable [TransmitToExe]. Then there are buttons on the username and password fields that issue a SendKeys "[TransmitToExe]" "[Username]". Generally speaking this works. The user must click in the username field on the browser page, then return to my app and click the send button. Repeat for the password. This could be done in reverse using a timer where the user clicks the username send on my app, and then within X second they must click the username box on the browser, but I think that will be more confusing in the end.

I also implemented a feature that allows the user to specify a browser program to use in place of the default browser. If the override is specified, then the GO button on my URL field issues a Run statement with the URL as a parameter. If the override is NOT specified, then the default is used and the GO button issues an Internetlink command with the URL as a parameter.

The results of the RUN and INTERNETLINK commands are VERY different. For example, using Firefox as the default browser, accessing different websites, the SendKeys works every time. Using Internet Exploder as an override, the SendKeys works the first time only. After that somehow IE wipes the value of [TransmitToExe] or somehow affects the operation of SendKeys and then SendKeys only sends data to box on my app. Other browsers have freakish quirks as well. WhiteHat Aviator will not accept SendKeys ever. Safari is sometimes, Chrome sometimes, etc.

I haven't done exhaustive testing with both RUN and INTERNETLINK, but I will and when I do I will post a table of results here.

There are also differences in operation depending on what kind of form is on screen in the browser. Javascript pop-up prompts will not accept SendKeys. Yahoo login does not accept SendKeys either. Other sites do weird things too. For example Allstate does an infurating thing where if you enter the username, and then click away to another app to get a password, then Allstate wipes out the username entry, or password, back and forth. They actually force the user to manually type in the data. Some webmaster didn't think about that much before doing that. They are ensuring that a keylogger gets it shot.

Figuring out just what will work and what won't is going to be a mess. But, I'll get back with feedback later.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Previous

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 3 guests