Sign in to follow this  
Followers 0
JamesWilcox

Can someone help me with this control?

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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 :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 :whistle: .

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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Slavik

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