Jump to content

Controlsend & Send help required


Hina
 Share

Recommended Posts

How can I send "Control+T" word command to Mozilla Firefox. Just give me idea I am confuse that how to send keys control & not just the text I already read the help book but coudend get the answer for example according to help book "^" this sign is used to send controll key strock but when I send the controll by using controlsend command it dosen't do any thing for example

Controlsend("Mozilla Firefox", "", "MozillaUIWindowClass", "^t", 1)

But it do nothing actually I am intreseted to open a new tab when windows of firefox exsist & open any specific address for example google plz give me idea & correct me

Link to comment
Share on other sites

Not sure if this is what you want but if you throw a ControlFocus in there it will get the end result. I noticed you were trying to use "MozillaUIWindowClass", as the ControlID, if you use Autoit v3 Window Info you see that the Control ID Is actually blank, or maybe I am just reading it incorrectly.

ControlFocus("Mozilla Firefox", "", "")
Controlsend("Mozilla Firefox", "", "", "^t")
Link to comment
Share on other sites

  • Developers

I am using verion 3 but not beta version & ur code is not working on that version plz someone help me

You are getting somewhat annoying here as I think they are trying to help you and "you are not helping much to help you"!

What about being clear in the exact version you are running and what/how you are exactly testing...

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

This is also working fine for me:

Opt("WinTitleMatchMode", 2)  
ControlFocus("Mozilla Firefox", "", "")
Controlsend("Mozilla Firefox", "", "", "^t")

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Dear Jos I try every thing but diden't succeed & I am having verion 3 of autoit given on 1st page of autoitscript

Which version 3? the version number has 4 numbers separated by a DOT.

Also try the script I posted above yours to ensure the window is properly found.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Got it brother Jos its now working 100% thx a lot very very thx

Now can U tell me how can I set a specific page for example that when new tab open it open google??

If you would use the link I mentioned above and download FF.au3 you could use #include <FF.au3> in your script and use something as simple as:

_FFStart("http://www.google.com")

to open Firefox and have it navigate to google.com

Edit: My advice would be to read the documentation on FF.au3 it is full of useful information and will give ideas on how to do a lot with Firefox, probably more then you would want to. You can find a link to the documentation in this post as well. http://www.autoitscript.com/forum/index.php?showtopic=70821

Edited by schilbiz
Link to comment
Share on other sites

on that page there are a lot of links plz give me direct link also do check ur PM & tell me how U know that firefox isn't have any class while as Autoit Info tool is showing its class as "MozillaUIWindowClass"

Link to comment
Share on other sites

on that page there are a lot of links plz give me direct link also do check ur PM & tell me how U know that firefox isn't have any class while as Autoit Info tool is showing its class as "MozillaUIWindowClass"

It definitely does have a class it just doesn't have a ControlID. - Atleast how I understand the AutoIt Info tool.

If you click the link I have mentioned you will see the download for FF.au3 on the very first post from Volly. If you open FF.au3 in SciTE you will get a good idea what it does, it is fairly commented.

Link to comment
Share on other sites

  • 1 year later...

If WinExists("Mozilla Firefox") Then
    If Not WinActive("Mozilla Firefox") Then
        WinActivate("Mozilla Firefox")
        WinWaitActive("Mozilla Firefox")
    EndIf
    Send("^t")
Else
    MsgBox(0, "", "You dont have that win")
EndIf

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