Sign in to follow this  
Followers 0
april

question on auto test for notepad

9 posts in this topic

Hi all,

After I open a notepad, input some text to notepad, then I want to au3 script to click "Save As". I have tried to use AutoIt v3 Window Info to grab information for "Save as", but I could not find any info.

Anyone knows how to do it in au3?

Thanks!

April

Share this post


Link to post
Share on other sites



Hi all,

After I open a notepad, input some text to notepad, then I want to au3 script to click "Save As". I have tried to use AutoIt v3 Window Info to grab information for "Save as", but I could not find any info.

Anyone knows how to do it in au3?

Thanks!

April

Post what you tried. AU3Info.exe has no trouble with the "Save As" dialog window from Notepad.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

My code:

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("This is some text.")

WinMenuSelectItem("Untitled - Notepad", "", "&File", "Save As..." )

Share this post


Link to post
Share on other sites

My code:

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("This is some text.")

WinMenuSelectItem("Untitled - Notepad", "", "&File", "Save As..." )

What happens next?

That pops the SaveAs dialog, and then you check it out with AU3Info.exe to know what to change, right?

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

My problem is "Save as" dialog Never popup. So I Can't continue to do other things.

Thanks!

April

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

My problem is "Save as" dialog Never popup. So I Can't continue to do other things.

Thanks!

April

can this help?

WinWaitActive("Untitled")
Send("^s")
WinWaitActive("Save As")

edit: or this

WinMenuSelectItem("Untitled - Notepad", "", "&File", "Save &As..." )

from autoit help file

Thus, the menu item File would actually require the text "&File", and Convert would require "Con&vert"

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

My problem is "Save as" dialog Never popup. So I Can't continue to do other things.

Thanks!

April

Oops, I missed that. You need:
"&File", "Save &As..."

Note the 'A' is an accelerator key in 'Save As'.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Thank you for the help. It works.

However, I have one more question. If I directly look at the menu,there is _ under A for "Save As...". Also there is no _ under "File". How could I know there is accelerator key?

Thanks!

April

Share this post


Link to post
Share on other sites

Thank you for the help. It works.

However, I have one more question. If I directly look at the menu,there is _ under A for "Save As...". Also there is no _ under "File". How could I know there is accelerator key?

Thanks!

April

you press on keyboard ALT then F then A, at the moment you press ALT youl see place where _ is located


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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  
Followers 0