Sign in to follow this  
Followers 0
Grezvangbe

ControlMove Help

16 posts in this topic

Having problems using the ControlMove command. (i just started using AutoIt yesterday)

I want to know if there is any way to make AutoIt skip looking for the control id?

ControlMove ("title", "text", controlID, x, y, .......)

Share this post


Link to post
Share on other sites



the reason i want to skip the controlID, is because i don't see it in the control tab of the AutoIt window info

Share this post


Link to post
Share on other sites

Grezvangbe,

Welcome to the AutoIt forum. ;)

On the Help file page for ControlMove you can see there is link within the controlID explanation - if you follow it you will find a page that shows you all of the ways to define a control. One of those should help you. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

No. As you can see from the docu the ControlID is a mandatory parameter.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

As far as I know the control ID field is required. You can use the window info tool to get it.

Share this post


Link to post
Share on other sites

I actually just found a way to skip it... I think.

ControlMove ("title", "text", "?" , x, y, width, height)

I didn't get an error at least.

Share this post


Link to post
Share on other sites

It's like telling someone to move an object without telling them what to move...

Boss: Hey you... go move that thing over there.

You: What thing?

Boss: That thing.

You: Can you at least point to it?

Boss: No... just move it.

You: Move what? You're not telling me what you want moved.

Boss: You're fired.

1 person likes this

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

It's like telling someone to move an object without telling them what to move...

Boss: Hey you... go move that thing over there.

You: What thing?

Boss: That thing.

You: Can you at least point to it?

Boss: No... just move it.

You: Move what? You're not telling me what you want moved.

Boss: You're fired.

True...

here is what AutoIt window info (control tab) is telling me this:

Class ComboBox

Instance 1

Classname NN Combobox1

Name

Advanced Mode [CLASS:ComboBox; INSTANCE:1]

ID

Text

Position 245, 36

size 250, 21

ControlCick Coords 170, 8

style 0x56010203

ExStyle 0x00000000

Handle 0x0011053E

Share this post


Link to post
Share on other sites

Grezvangbe,

Why not read the responses you have been given above - what you have is quite enough to identify the control. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

You have the handle, and also the control's class and instance number, use one of those for the ControlID parameter for ControlMove. See the help file and click on the link to the types of controls you can reference for controlid.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

oh wow. I am so derp. It turns out i was looking for a command more like WinMove no wonder i had no idea what ControlID was for.

Share this post


Link to post
Share on other sites

sorry about that

Share this post


Link to post
Share on other sites

could you possibly link those youtube vids? thanks if you do ;)

Share this post


Link to post
Share on other sites

could you possibly link those youtube vids? thanks if you do ;)

autoit - YouTube

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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