Jump to content

help with dropdown combobox


drzen
 Share

Recommended Posts

I'm trying to automate a pdf creation in Adobe Acrobat 7.0.

All go right but.... I can't select my scanner from dropdown list

ControlCommand ("Create PDF from scanner", "", "ComboBox1","SelectString","FUJITSU")

Where is my mistake?

It seems that I can't select sucessufully from drop box.

May you help me?

Thanks in advance.

v.

Link to comment
Share on other sites

  • Moderators

I sure hope someone understands this... this is not a good thread to read if you are sleep deprived B)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

If you use the AutoIt Window Info tool you will get the correct ControlID to use.

ComboBox1 is the ClassNameNN


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

  • Moderators

@BigDog... Classname should still work in a lot of cases.

@drzen

EDIT: Forget I even tried... it looked horrible B) [deleted attempt]

Good Luck!

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

@BigDog... Classname should still work in a lot of cases.

@drzen

EDIT: Forget I even tried... it looked horrible B) [deleted attempt]

Good Luck!

I understand that Classname should work in a lot of cases but it did not in this case. I was just suggesting another option.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Everything looks right. I would go with BigDod's suggestion of trying to use the actual ControlID, instead of the ClassNameNN. I have never actually used this function, but I just looked it up in the helpfile and your example seems to be by the book.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Everything looks right. I would go with BigDod's suggestion of trying to use the actual ControlID, instead of the ClassNameNN. I have never actually used this function, but I just looked it up in the helpfile and your example seems to be by the book.

JS

ControlID appear NULL :-( using AU3Info.exe

Link to comment
Share on other sites

ControlID appear NULL :-( using AU3Info.exe

Odd.. ControlID = NULL, but it still has a ClasNameNN?

Never seen that one. Nice unique case.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Odd.. ControlID = NULL, but it still has a ClasNameNN?

Never seen that one. Nice unique case.

JS

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 111 Y: 15 W: 259 H: 22

Control ID:

ClassNameNN: ComboBox1

Text:

This appears only in the window "Create new PDF from scanner" of Adobe Acrobat 7.0

Link to comment
Share on other sites

  • Moderators

When your holding your mouse over the combo box, and the window is active... can you post a copy of AutoInfo (the entire thing) in here... I'm a bit more awake now B), and I'll try to help.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

When your holding your mouse over the combo box, and the window is active... can you post a copy of AutoInfo (the entire thing) in here... I'm a bit more awake now B), and I'll try to help.

Thanks a lot!

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Crea PDF da scanner

Class: #32770

Size: X: 447 Y: 259 W: 483 H: 237

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 599 Y: 312

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xFFFFFF Dec: 16777215

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 111 Y: 15 W: 259 H: 22

Control ID:

ClassNameNN: ComboBox1

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

&Scanner:

?

Esegui sca&nsione:

?

&Destinazione:

?

&Riconosci testo mediante OCR

&Impostazioni...

Aggiungi &tag a documento (migliora le funzioni di Accesso facilitato per gli utenti disabili)

?

Impost&azioni immagine...

Scansione

Annulla

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Edited by drzen
Link to comment
Share on other sites

  • Moderators

Sorry it took so long... I was caught up with my own script:

Here try this:

ControlCommand("Crea PDF da scanner", "", "ComboBox1","SelectString","FUJITSU fi-4120C2dj")

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Sorry it took so long... I was caught up with my own script:

Here try this:

ControlCommand("Crea PDF da scanner", "", "ComboBox1","SelectString","FUJITSU fi-4120C2dj")
Just do it, no action :-( The combobox don't change value.

ControlCommand ("Crea PDF da scanner", "", "ComboBox1","SelectString","FUJITSU fi-4120C2dj")

ControlCommand ("Crea PDF da scanner", "", "Button1","Check", "")
ControlCommand ("Crea PDF da scanner", "", "Button3","Check", "")

The check of buttons go right.

Link to comment
Share on other sites

  • Moderators

I'm sorry, I neither create PDF's, nor do I understand what you mean by "check" of buttons go right.

Did the command I gave you work?

Try this for the "check" of buttons.

ControlClick("Crea PDF da scanner", "", "Button1", "LEFT", 1)
ControlClick("Crea PDF da scanner", "", "Button3", "LEFT", 1)

Edit:

I think I understand that your saying the "check" of buttons are doing the "right thing". In that case ignore the above. If no one else can come up with a solution for you, you may want to try MouseClick() and Send() options if you know it will always be 2 down.

Maybe something like this?:

Opt("MouseCoordMode", 0); check the helpfile to see what you would need to set the "0" to.

MouseClick("LEFT", X, Y, 1, 1)
Send("{Down 2}")
Send("{Enter}")
ControlCommand ("Crea PDF da scanner", "", "Button1","Check", "")
ControlCommand ("Crea PDF da scanner", "", "Button3","Check", "")

Just an alternative... hope you get the answer you need B)!!

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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