Sign in to follow this  
Followers 0
Triton

Window With Tabs Question

11 posts in this topic

I'm trying to access a a window with multiple tabs, for example to access the computer name tab in the system properties window. I've tried to using sending a keystroke to initiate the system properties windows and then arrow over one tab but that seems to be unreliable. If i run it say at startup the system properties window opens and thats it.

any ideas?

:whistle:


Triton

Share this post


Link to post
Share on other sites



ControlCommand has tabbed window support, have you tried that? Check the help file for information, I've not used it so I can't help you there.

Share this post


Link to post
Share on other sites

hey has anyone here tried like show control.. i remmber using it and it did jump to that tab... wonder if it works for anyone else...

:whistle:


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

; Note: not tested

WinWait ("System Properties")

ControlCommand("System Properties","","SysTabControl321","TabRight","")

; By the way, there might be a registry key you could change instead....


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

see ControlCommand with reference to it's CurrentTab, TabLeft, TabRight ability

Larry, that reminds me:

There is no "TabJump" feature. Some tab controls remember the last tab that was active instead of defaulting to the first tab.

; Example workaround for TextPad's Propties window
$n = 6 ;the 'Syntax' tab
$title = "Properties"

$t = ControlCommand($title,"","SysTabControl321","CurrentTab","")
If $t < $n Then
   While $t <> $n
      $t = $t + 1
      ControlCommand($title,"","SysTabControl321","TabRight","")
   Wend
Else
   While $t <> $n
      $t = $t - 1
      ControlCommand($title,"","SysTabControl321","TabLeft","")
   Wend
EndIf
Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Heres my code that only do the first part.

Send("#{PAUSE}")
WinWaitActive("System Properties")
ControlCommand("System Properties", "", "SysTabContol321", "TabRight", "")

When system properties opens it defaults to the Identification Tab then i try to goto the next tab on the right wich is Computer Name tab. I have has no luck.


Triton

Share this post


Link to post
Share on other sites

You mispelled "Control" in "SysTabControl321".

Share this post


Link to post
Share on other sites

Also, WinWaitActive isn't necessary, WinWait will suffice because the control related commands do not need for the window to be active.

Share this post


Link to post
Share on other sites

I copied and pasted it and farted for 5 minutes before noticing the spelling... you probably caught it straight way, I imagine...  B)

Lar.

I ran it once, looked back over the code and saw the mis-spelling. :angry::whistle:

Share this post


Link to post
Share on other sites

WOW!, I looked at it for a long time and didn't even see it.

Thanks guys,

tested it and works great!


Triton

Share this post


Link to post
Share on other sites

@CyberSlug

; Note: not tested

WinWait ("System Properties")

ControlCommand("System Properties","","SysTabControl321","TabRight","")

; By the way, there might be a registry key you could change instead....

These pcs are already part of a domain. We're trying to change the names to get them to a standard. If you just change the reg entries it will only change it locally and not the computer account on the domain.

any ideas?


Triton

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