Jump to content

Recommended Posts

Posted

I'm new to using AutoIt for doing this stuff, and I need to be able to automate the task of selecting a font in the Font dialog box...

Not sure if I'm not doing it correctly or what:

The dialog in question:

font.png

What AutoIt Spy shows when I put the mouse over the combo box list of fonts:

autoit.png

The code I've tried:

ControlCommand("#32770", "", "ComboLBox1", "SelectString", "Terminal")
ControlCommand("Font", "", "ComboLBox1", "SetCurrentSelection", "Terminal")


Posted

Well I can't find any of my script with examples of handling font dialogs, but as I recall the boxes above the combobox's are edit fields, so you just have to set the text per box.

So:

WinWaitActive ( "Font" )

ControlSetText ( "Font" , "" , "Edit1" , "Terminal" )

ControlSetText ( "Font" , "" , "Edit2" , "Bold" )

ControlSetText ( "Font" , "" , "Edit3" , "12" )

ControlClick ( "Font" , "" , "Button2" )

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...