Jump to content

Can we save the window page using autoit?


Go to solution Solved by madhuri,

Recommended Posts

I would say many windows and menus are able to be automated. Have you tried anything yet?

Depending on how you want to do it, you could look at Controlclick(), ControlSend() in the helpfile. 

EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

Hi EndFunc,

Iam able to click on File but iam not able to click on save Page As.

I tried like this:

WinWaitActive("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox","","20")
 If WinExists("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox") Then
    Send("!t")
    Sleep(5000)
    Send("!d")
   EndIf

 

If I am using Controlclick() iam not having control id for that bcz iam not able to get it frm window info.

 

Thanks,

Link to comment
Share on other sites

Hi EndFunc,

Iam able to click on File but iam not able to click on save Page As.

I tried like this:

WinWaitActive("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox","","20")

 If WinExists("Absolute Beginners - General Help and Support - AutoIt Forums - Mozilla Firefox") Then

    Send("!t")

    Sleep(5000)

    Send("!d")

   EndIf

 

If I am using Controlclick() iam not having control id for that bcz iam not able to get it frm window info.

 

Thanks,

 

Not sure what it is you're doing but this is a simple version.

WinActivate("AutoItScript - AutoItScript Website - Mozilla Firefox")
Send("!f")
Sleep(500)
Send("a")
WinWaitActive("Save As")
Sleep(1000)
Send("!s")
EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

This is reliable, with IE...if only there was a way to interact with the window class #32768...microsoft search states that getmenu should work...it doesn't, can't grab it's commandids...out of ideas...but this is not needed due to the IE functions that can pull the source.

#include <GuiToolbar.au3>
#include <ie.au3>
#include <WinAPI.au3>
$oIE = _IECreate("google.com")
$hWin = _IEPropertyGet($oIE, "HWND")
ConsoleWrite($hWin & @CRLF)
WinActivate($hWin)
$hControl = ControlGetHandle($hWin, "", "[CLASS:ToolbarWindow32; INSTANCE:5]")
$i = 0
While True
    $cmd = _GUICtrlToolbar_IndexToCommand($hControl, $i)
    If StringLen ($cmd) > 2 Then
        ConsoleWrite($cmd & @TAB)
        $text = _GUICtrlToolbar_GetButtonText($hControl, $cmd)
        ConsoleWrite($text & @CRLF)
        If $text = "&File" Then
            _GUICtrlToolbar_ClickButton($hControl, $cmd)
            ExitLoop
        EndIf
    Else
        $cmd = ""
        $hControl = ""
        Exit
    EndIf
    $i += 1
WEnd

$hwnd = WinWait("[CLASS:#32768]")
ConsoleWrite($hwnd & @CRLF)
Sleep(500)
ControlSend($hwnd,"","","a")
Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

thank u very much now I got it...........

hi sir ,

one more clarification i want.......... actually i added some addons in my FF so in Tools it is showing as export cookies (for this no underline is there ), how to work with those scenarios. Please help me.

Thanks,

Link to comment
Share on other sites

hi sir ,

one more clarification i want.......... actually i added some addons in my FF so in Tools it is showing as export cookies (for this no underline is there ), how to work with those scenarios. Please help me.

 

Thanks,

You'll probably need the Firefox UDF to do any of that kind of thing.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

You'll probably need the Firefox UDF to do any of that kind of thing.

Hi,

How to use FF UDF ? I explored what I understood is first we have place FF.au3 file into our script folder and we have use those predefined functions , Is is correct sir?

Iam new to this tool sir please help.

Thanks.

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