Jump to content
Sign in to follow this  

Trouble with Selecting a button on Program

Recommended Posts

Hello everyone!

I am new to autoit and had a unique problem that I was hoping someone could help with.

I am trying to select something that's in a drop down menu on a toolbar.

I have found I can find the window name and control ID in the help tool with the sci-editor.

When I view the source I see what button I want to select but I'm having a hard time selecting

this button in the source code.

<button id="button_desktop_internal_aa879690956e11e2bcffe6b69e160b18" action="launch_desktop_internal_aa879690956e11e2bcffe6b69e160b18"/>

I've tried control click. Is there a way to do the action attached without actually selecting it?

I've tried ControlClick(mywindow, "", "[CLASS:TRzToolbar; INSTANCE:1]"). From what I've seen all the buttons to click on the toolbar have the same ID.

Thanks in advance! Below is the summary from the info Tool.

>>>> Window <<<<

Title: Expeditors Desktop - Desktop Version: / 1.16.3 / ;SP1 / IE 8.00.7600.16385 (win7_rtm.090713-1255)0

Class: TfmBrowser

Position: 0, 0

Size: 1280, 36

Style: 0x170F0000

ExStyle: 0x00050180

Handle: 0x004807D2

>>>> Control <<<<

Class: TRzToolbar

Instance: 1

ClassnameNN: TRzToolbar1


Advanced (Class): [CLASS:TRzToolbar; INSTANCE:1]

ID: 5245094


Position: 90, 0

Size: 1176, 22

ControlClick Coords: 394, 10

Style: 0x56000000

ExStyle: 0x00010000

Handle: 0x005008A6

>>>> Mouse <<<<

Position: 491, 17

Cursor ID: 0

Color: 0x000000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

>>>> Hidden Text <<<<








Edited by dar100111

Share this post

Link to post
Share on other sites

You need to send the commandid of the specific button on the toolbar via:


"SendCommandID", Command ID

Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.

you might get lucky and have the conmmand id's displayed on the au3info tool..toolbar tab...else you need a dev resource to provide them for you, or do a loop, and try to get it yourself.

Not sure if it will function for that specific kind of toolbar.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post

Link to post
Share on other sites

Last chance, look into the _guictrltoolbar* functions...you might be able to grab the buttons...or relative position clicks...the _guictrltoolbar would be much cleaner.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post

Link to post
Share on other sites

So far I can only get MouseClick to work (which I'd like to avoid) Since this is a homegrown program I may have to look into more options. I'm not sure how the _GUITOOLBAR functions would play into it either but I'll have to keep trying. Does anyone see a way to do this similiar to how the _IE functions would work for this source code? I underlined and bold the example. Thanks again for the help



<title>Expeditors Desktop - Desktop Version:</title>

<META name="eibrowser" content="autosize launch">

<META name="rununsignedscript" content="yes">

<META name="remotescriptrunner" content="no">

<META name="scriptlog" content="true">

<META name="scriptlogevents" content="false">

<META name="limitscriptsize" content="-1">



<div id="DESKTOPFORM" style="height:0px">


<?xml version="1.0" ?>

<screendef formname="EI Toolbar" appbar="true">

<toolbar id="DesktopBar">


<action id="launch___grp_global_2" type="desktop" caption="Dial Export" image="4" disabled="5" target="/__grp_global/2"/>

<action id="launch___grp_global_1" type="desktop" caption="Dial Import" image="4" disabled="5" target="/__grp_global/1"/>

<action id="launch___grp_global_0" type="desktop" caption="EIFA Review" image="4" disabled="5" target="/__grp_global/0"/>

<action id="launch_desktop_internal_604934e0bce411df9c65fb2154d5dfc2" type="desktop" caption="Export" image="4" disabled="5" target="/desktop_internal/604934e0bce411df9c65fb2154d5dfc2"/>

<action id="launch_desktop_internal_aa879690956e11e2bcffe6b69e160b18" type="desktop" caption="Global Export" image="4" disabled="5" target="/desktop_internal/aa879690956e11e2bcffe6b69e160b18"/>

<action id="launch_desktop_internal_d189daf0956e11e2bcffe6b69e160b18" type="desktop" caption="Global Import" image="4" disabled="5" target="/desktop_internal/d189daf0956e11e2bcffe6b69e160b18"/>

<action id="launch_desktop_internal_0eb39c0010d311dfa7da94dbfb947853" type="desktop" caption="Import" image="4" disabled="5" target="/desktop_internal/0eb39c0010d311dfa7da94dbfb947853"/>

<action id="launch_SSO_TRMS" type="webapp" caption="TRACE" image="4" disabled="5" target="/SSO/TRMS"/>

<action id="launch_SSO_DCS" type="webapp" caption="Transcon North America " image="4" disabled="5" target="/SSO/DCS"/>

<action id="expo" type="url" caption="exp.o" target="http://inspox.chq.ei"/>

<action id="enet" type="url" caption="e.net" target="http://www.chq.ei"/>

<action id="expd" type="url" caption="expd.com" target="http://www.expeditors.com"/>

<action id="notes" type="notes" caption="Notes" description="Notes - New Memo"/>

<action id="ats" type="url" caption="TS" image="14" disabled="15" target="http://ats.chq.ei:8121/ats/Login.jsp"/>

<action id="cll" type="shortcut" caption="Script Signing" image="0" disabled="1" target="C:Program FilesExpeditorsDesktopDeskScr.exe" >

<arg value="rralialdliat"/>




<button id="btnEnet" action="enet"/>

<button id="btnExpo" action="expo"/>

<button id="btnExpd" action="expd"/>

<button id="btnNotes" action="notes"/>

<button id="btnATS" action="ats"/>

<button id="btncll" action="cll"/>

<submenubutton caption="Launch" image="4" disabled="5">

<button id="button___grp_global_2" action="launch___grp_global_2"/>

<button id="button___grp_global_1" action="launch___grp_global_1"/>

<button id="button___grp_global_0" action="launch___grp_global_0"/>

<button id="button_desktop_internal_604934e0bce411df9c65fb2154d5dfc2" action="launch_desktop_internal_604934e0bce411df9c65fb2154d5dfc2"/>

<button id="button_desktop_internal_aa879690956e11e2bcffe6b69e160b18" action="launch_desktop_internal_aa879690956e11e2bcffe6b69e160b18"/>

<button id="button_desktop_internal_d189daf0956e11e2bcffe6b69e160b18" action="launch_desktop_internal_d189daf0956e11e2bcffe6b69e160b18"/>

<button id="button_desktop_internal_0eb39c0010d311dfa7da94dbfb947853" action="launch_desktop_internal_0eb39c0010d311dfa7da94dbfb947853"/>

<button id="button_SSO_TRMS" action="launch_SSO_TRMS"/>

<button id="button_SSO_DCS" action="launch_SSO_DCS"/>









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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...