Jump to content
Sign in to follow this  
Hina

Controlsend & Send help required

Recommended Posts

Hina

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

Share this post


Link to post
Share on other sites
schilbiz

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")

Share this post


Link to post
Share on other sites
Hina

I already perform all the above mention operations but didn't get success any body help me

Share this post


Link to post
Share on other sites
Hina

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

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

This is also working fine for me:

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Hina

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

Share this post


Link to post
Share on other sites
schilbiz

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

Share this post


Link to post
Share on other sites
Hina

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"

Share this post


Link to post
Share on other sites
schilbiz

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.

Share this post


Link to post
Share on other sites
NicePerson

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.