JamesWilcox Posted February 13, 2007 Share Posted February 13, 2007 I'm using the Windows Info tool and need to write a script to send different values to the spin control but it doesn't seem to change anything. I need to open a text file read its contents and send the information to the spin control but it doesn't work. I was using ControlSend and ControlSetText but it doesn't seem to work. I've attached the picture of what i'm trying to control. Its called notch options. When you hit the arrow keys it increments in multiples of 5.pic.zip Link to comment Share on other sites More sharing options...
enaiman Posted February 13, 2007 Share Posted February 13, 2007 I'm using the Windows Info tool and need to write a script to send different values to the spin control but it doesn't seem to change anything. I need to open a text file read its contents and send the information to the spin control but it doesn't work. I was using ControlSend and ControlSetText but it doesn't seem to work. I've attached the picture of what i'm trying to control. Its called notch options. When you hit the arrow keys it increments in multiples of 5.What AutoIT version you're using?For me 3.2.2.0 didn't send anything (ControlSend) and when I went back to 3.2.1.0 everything was OK. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 13, 2007 Moderators Share Posted February 13, 2007 (edited) I'm using the Windows Info tool and need to write a script to send different values to the spin control but it doesn't seem to change anything. I need to open a text file read its contents and send the information to the spin control but it doesn't work. I was using ControlSend and ControlSetText but it doesn't seem to work. I've attached the picture of what i'm trying to control. Its called notch options. When you hit the arrow keys it increments in multiples of 5.Have you tried to set the text to the actual Edit1 box? You should be able to get the current selection by something like: ControlGetText('WinName', '', 'Edit1')oÝ÷ Ø*Þj׬¢g)à¶ë-j̨ºwv+méÚºÚ"µÍÛÛÛÙ]^ ÌÎNÕÚ[[YIÌÎNË ÌÎNÉÌÎNË ÌÎNÑY]IÌÎNË ÌÎNÓ][HÙ IÌÎNÊ This is an assumption of course, since we don't have the app to play with . Edit: I'd like to iterate something... You need to use the Edit box itself ClassNameNN, and not the msctls_updown321 ClassNameNN, in the example I'm thinking of. Edited February 13, 2007 by SmOke_N 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 More sharing options...
Slavik Posted December 24, 2009 Share Posted December 24, 2009 You need to use the Edit box itself ClassNameNN, and not the msctls_updown321 ClassNameNN, in the example I'm thinking of.Is it possible to use original component, which has Name (as "msctls_updown321" in example above)? Because, when i use ClassNameNN reference to Edit Control inside of my component - it changing name and is not reliable method to reference this Control.By the way i using Visual Basic "NumericUpDown" control. It consists of internal Edit Box and 2 buttons (Up and Down). So i can reliable call "NumericUpDown" control, but can't reliable reference to it's children - Edit, Up and Down. Any suggestions? Link to comment Share on other sites More sharing options...
Slavik Posted December 28, 2009 Share Posted December 28, 2009 (edited) Found solution: ControlFocus ( $capt, "","[NAME:PROCPhase0PreviewMaskDiameterYNumericUpDown]" ) ControlClick ($capt, "", "[NAME:PROCPhase0PreviewMaskDiameterYNumericUpDown]", "", 1, 5,5) ; "5,5" - relative coordinates of Edit Box inside UpDown control Send ( "{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}" & $Slots[$i][2] & "{ENTER}" ) ; "{DEL}{DEL}..." is to delete previous value. Probably some more gracious solution can be found. But that worked for me... Edited December 28, 2009 by Slavik Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now