Jump to content

Needs to click on "enter" in the address bar


zxc3
 Share

Recommended Posts

Send("!d")

Send("{ENTER}")

Thanks, but I have already opened a window http://www.bbc.co.uk/, but adress is not pressed- an error, where?

AutoItSetOption("WinTitleMatchMode",4)

Global $handle

#include <FF.au3>

$handle = WinGetHandle("BBS - Homepage")

;WinClose($handle)

ControlSend($handle,"!d")

ControlSend($handle, "{ENTER}")

controlsend -error?

Edited by zxc3
Link to comment
Share on other sites

Thanks, but I have already opened a window http://www.bbc.co.uk/, but adress is not pressed- an error, where?

AutoItSetOption("WinTitleMatchMode",4)

Global $handle

#include <FF.au3>

$handle = WinGetHandle("BBS - Homepage")

;WinClose($handle)

ControlSend($handle,"!d")

ControlSend($handle, "{ENTER}")

How to properly must be written ControlSend() functions?

Link to comment
Share on other sites

How about:

$hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]")
$hFFControl=ControlGetHandle($hFFWindow,"","[CLASS:MozillaWindowClass; INSTANCE:1]")
WinActivate($hFFWindow)
ControlSend($hFFWindow,"",$hFFControl,'^l')
ControlSend($hFFWindow,"",$hFFControl,'{ENTER}')
Edited by Ascend4nt
Link to comment
Share on other sites

How about:

$hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]")
$hFFControl=ControlGetHandle($hFFWindow,"","[CLASS:MozillaWindowClass; INSTANCE:1]")
WinActivate($hFFWindow)
ControlSend($hFFWindow,"",$hFFControl,'^l')
ControlSend($hFFWindow,"",$hFFControl,'{ENTER}')

Thanks a lot, but I do not understand everything.

1.I have already opened page.

2.Then the script is run , it chooses this page with Name and ID.

3.Sends to the address bar of the desired character-"enter"

and so on...

Link to comment
Share on other sites

Why do need WinActivate ()?

But with it and without it characters are not transmitted in the address bar.

When I put the cursor at the end of the address, the script works, but added "l" at the end of the address. How to send CTRL L?
Link to comment
Share on other sites

If this is indeed Firefox you are talking about, the code I posted should have worked. However, I'm not certain if keyboard shortcuts are different for your country. You might even have different window classes showing up for Firefox (check with the AutoIt info tool).

Also, if your PC is very fast, perhaps you need to change the key delay options. Here's an alternate version:

Opt("SendKeyDelay",0)
 Opt("SendKeyDownDelay",0)
$hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]")
WinActivate($hFFWindow)   ; Window must be active
SendKeepActive($hFFWindow)   ; This tries to keep all subsequent Send()'s directed at the given window
Send('^l')
Send("{ENTER}")
Link to comment
Share on other sites

If this is indeed Firefox you are talking about, the code I posted should have worked. However, I'm not certain if keyboard shortcuts are different for your country. You might even have different window classes showing up for Firefox (check with the AutoIt info tool).

Also, if your PC is very fast, perhaps you need to change the key delay options. Here's an alternate version:

Opt("SendKeyDelay",0)
 Opt("SendKeyDownDelay",0)
$hFFWindow=WinGetHandle("[CLASS:MozillaUIWindowClass]")
WinActivate($hFFWindow)   ; Window must be active
SendKeepActive($hFFWindow)   ; This tries to keep all subsequent Send()'s directed at the given window
Send('^l')
Send("{ENTER}")

Still not working, although in manual mode ctrl + L works with any keyboard layout.

Can the FF setting affect this? What is different manual input from the input through a script?

ControlSend($hFFWindow,"",$hFFControl,"{ASC 012}")-too...

post-6124-0-10108000-1289241117_thumb.jp

Edited by zxc3
Link to comment
Share on other sites

Both "^l", and "!d" do the same for me either manually or with Send().

Is your window visible and active?

Why do you use wintitlematchmode 4, and then go on to use a partial title?, try mode 2.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Both "^l", and "!d" do the same for me either manually or with Send().

In manual mode, alt+d on the English keyboard layout switches to the address bar,

and the Russian switches on the menu - View.

But in the script, I can not transmit any control character in the address bar of FF.

Is your window visible and active?

Yes

Why do you use wintitlematchmode 4, and then go on to use a partial title?, try mode 2.

it is changes nothing
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...