Jump to content

automation question from newb


blender
 Share

Recommended Posts

Hi, all

I am new to autoit. I am using it for automating some windows applications. (like automatically start the application, go to this menu and click an option under the menu, etc...)

Now I can only to do "Send ("{TAB}")" numerous times to reach the key I want to click. I know this is dangerous since the code will break if the GUI is changed.

I heard you can use DOMs on GUI in autoit. But I can't find a good tutorial on this. Does anyone can give me a tutorial on how do use DOMs to program using autoit?

Thanks <_<

Link to comment
Share on other sites

Hi, all

I am new to autoit. I am using it for automating some windows applications. (like automatically start the application, go to this menu and click an option under the menu, etc...)

Now I can only to do "Send ("{TAB}")" numerous times to reach the key I want to click. I know this is dangerous since the code will break if the GUI is changed.

I heard you can use DOMs on GUI in autoit. But I can't find a good tutorial on this. Does anyone can give me a tutorial on how do use DOMs to program using autoit?

Thanks :)

A Document Object Model (DOM) implies working with an app like IE, Word, or Excel, not a dialog window. Are you talking about a web page? Then work your way through the examples in the help file under the _IE* functions.

If that's not it, please explain exactly what app and what kind of dialog window you are dealing with.

<_<

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
Link to comment
Share on other sites

A Document Object Model (DOM) implies working with an app like IE, Word, or Excel, not a dialog window. Are you talking about a web page? Then work your way through the examples in the help file under the _IE* functions.

If that's not it, please explain exactly what app and what kind of dialog window you are dealing with.

<_<

Thanks for the reply. I am working with applications like MS project.

Link to comment
Share on other sites

Does the key have a "shortcut" to it? In other words, is there an underlined letter in the text of the button? (You might have to press the Alt key alone to see it appear.)

If so, just send that Alt key combo instead. For instance if you see the letter "s" underlined when looking at the button (or whatever kind of UI element it is) you can do "send('!s')" to send the Alt+s key combo to press the button instead of trying to use "send('{TAB}') so many times to get there then "send('{SPACE}')" to press it.

Works for me anyway on most things. HTH.

My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!
Link to comment
Share on other sites

Does the key have a "shortcut" to it? In other words, is there an underlined letter in the text of the button? (You might have to press the Alt key alone to see it appear.)

If so, just send that Alt key combo instead. For instance if you see the letter "s" underlined when looking at the button (or whatever kind of UI element it is) you can do "send('!s')" to send the Alt+s key combo to press the button instead of trying to use "send('{TAB}') so many times to get there then "send('{SPACE}')" to press it.

Works for me anyway on most things. HTH.

Yes, most of the buttons have shorcuts and I use them all the time. But there are a few buttons that do not have shortcuts which means Alt+key combo won't work. I am using Send("{TAB}") numerous times to reach those buttons. So I am wondering if I can use DOMs....

Link to comment
Share on other sites

Thanks for the reply. I am working with applications like MS project.

Most of them expose COM objects methods, and some have a DOM. The IE.au3 UDF for IE, and ExcelCOM_UDF.au3 for Excel are two excellent examples, and AutoIt has _Word* functions included now. I don't know Project, but it probably has something along that line. It comes down to particulars.

You asked for tutorials. I don't know about that, but there are many examples included in the help file under the _IE* functions -- ever run any of them? There are example files to download in the topic you download ExcelCOM_UDF from -- ever run any of those? There are examples in the help file with the _Word* functions -- ever run any of those?

Pick one and just do it...

<_<

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
Link to comment
Share on other sites

Yes, most of the buttons have shorcuts and I use them all the time. But there are a few buttons that do not have shortcuts which means Alt+key combo won't work. I am using Send("{TAB}") numerous times to reach those buttons. So I am wondering if I can use DOMs....

Look in the help under ControlClick; it might be of some help rather than multiple sends of the tab key. Worth a shot anyway.
My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!
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...