Jump to content

Recommended Posts

My bot idea is getting (X) And (Y) Points from Arcmap project and search for it on map later, but I can't read (Easting) And (Northing) from Arcmap

image.png.5a26bc1de97b46e7c843ae191802a09e.png

Autoit Window Info:

>>>> Window <<<<
Title:  ZONE 35.mxd - ArcMap
Class:  Afx:01000000:b:00010003:00000006:09972291
Position:   -8, -8
Size:   1936, 1056
Style:  0x17CFC000
ExStyle:    0x00000100
Handle: 0x00000000000B0B2E

>>>> Control <<<<
Class:  ListBox
Instance:   3
ClassnameNN:    ListBox3
Name:   
Advanced (Class):   [CLASS:ListBox; INSTANCE:3]
ID: 251163592
Text:   
Position:   1458, 342
Size:   462, 547
ControlClick Coords:    329, 172
Style:  0x56010111
ExStyle:    0x00000000
Handle: 0x00000000010B0C2E

>>>> Mouse <<<<
Position:   1787, 514
Cursor ID0
Color:  0xFFFFFF

>>>> StatusBar <<<<
1:  No identified features
2

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
xtpBarTop
XTools Pro Interactive
XTools Pro
Distributed Geodatabase
Standard
1:600
1:600
Editor
Main Menu
xtpBarBottom
Draw
10
10
Arial
xtpBarLeft
Tools
xtpBarRight
Splitter
Table Of Contents
Contents
Tree1
xtpBarTop
ContentsViewToolbar
xtpBarBottom
xtpBarLeft
xtpBarRight
Splitter
Splitter
Table
xtpBarTop
TableDockToolbar
xtpBarBottom
xtpBarLeft
xtpBarRight
SGNDMNHL_NEW selection
Attributes of SGNDMNHL_NEW selection
SGNDMNHL
Grid
xtpBarTop
xtpBarBottom
TableFormToolbar
1
xtpBarLeft
xtpBarRight
Attributes
35/370/SA5
Tree1
xtpBarTop
AttributesToolbar
xtpBarBottom
xtpBarLeft
xtpBarRight


>>>> Hidden Text <<<<
Starting Background Services
Results
Tree1
xtpBarTop
xtpBarBottom
xtpBarLeft
xtpBarRight
Representation Rule
Representation rule:
Erase shape override
No common properties.
No common class
The entire free representation is selected. You can choose to assign a representation rule from the pull-down menu above. The feature will no longer be a free representation. You can undo this edit operation if necessary. To edit the entire free representation, click Edit Free Representation button above.
Edit Free Representation
Symbol
No global effect
Tool Operation: none
Select a Representation Editing tool to access the properties of the selected representation(s) associated with that tool.
Tree1
No representations selected
Tab1
List1
Tree1
Identify
Identify from:
<Top-most layer>
Tree1
Location:
List1
Click on or drag a box over a feature or place on the map you want to identify. Its attributes will be listed here.

Use the dropdown list to control which layer(s) will be identified.

Press the SHIFT key to add features to the current list.

The Location field gives you the coordinates of the location you clicked.
Attachments
No identified features
Prepare
Static
Status: Not Analyzed
No items
Show only unresolved items
xtpBarTop
CreateFeatureToolbar
<Search>
xtpBarBottom
xtpBarLeft
xtpBarRight
Attributes of SGNDGULL__NEW
SGNDGULL
Grid
G
xtpBarTop
xtpBarBottom
TableFormToolbar
1
xtpBarLeft
xtpBarRight
Attributes of SGNDGULL__NEW selection
SGNDGULL
Grid
G
xtpBarTop
xtpBarBottom
TableFormToolbar
1
xtpBarLeft
xtpBarRight
Attributes of GULY
GULY
Grid
1
xtpBarTop
xtpBarBottom
TableFormToolbar
1
xtpBarLeft
xtpBarRight
Attributes of SGNDGULL_FindIdentical
SGNDGULL_FindIdentical
Grid
1
xtpBarTop
xtpBarBottom
TableFormToolbar
1
xtpBarLeft
xtpBarRight
20/BO/CP/16
Catalog Window
Location:
Home - Project\MXD
暐䛑me rLeft
Home - Project\MXD
GxContentsView
ThumbnailView
PropertiesView
GxTreeView
Attachments
OK

My Try:

#include <Array.au3>


$Text = ControlGetText("ZONE 35.mxd - ArcMap", "", "[CLASSNN:ListBox3]")
MsgBox(0,"", $Text)
$split = StringSplit($Text, @LF)
_ArrayDisplay($split)

The result is always empty...

Edited by abdulrahmanok
Link to post
Share on other sites

Pretty sure you can use the _GuiCtrlListBox functions if you pass the handle to them.

Try something like this.

#include <GuiListBox.au3>
$hListbox = ControlGetHandle("ZONE 35", "", "CLASSNN:ListBox3")
If @error Then
    ConsoleWrite("Failed to find Listbox" & @CRLF)
    Exit
EndIf
$sEasting = _GUICtrlListBox_GetText($hListbox, 2)
$sNorthing = _GUICtrlListBox_GetText($hListbox, 3)
ConsoleWrite("Returned Values: (" & $sEasting & "), (" & $sNorthing & ")" & @CRLF)

 

Link to post
Share on other sites

Thanks for trying... after running your code i got error:

"Failed to find Listbox"

So I Changed: 

$hListbox = ControlGetHandle("ZONE 35", "", "CLASSNN:ListBox3")

To:

$hListbox = ControlGetHandle("ZONE 35", "", "[CLASS:ListBox; INSTANCE:3]")

And its worked but the returned Value east & north was:

 

I know that I can use image search or Mouseclick  with Send to copy these values, but i have awfull experience with that when changing computer or resolution.

Link to post
Share on other sites

if you are able to select an item in that list, then see if this function returns anything in the array:  _GUICtrlListBox_GetSelItemsText 

If it does return the text from what you selected, then use _GUICtrlListBox_GetSelItems to show you what Index #'s to use in the first script I sent.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...