Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Click an item in TreeView or SysTreeView32

$
0
0

Hi @ all,

 

I'm quite new to autoit and I try to automate the postprocessing of an FEA using Autodesk Mechanical Simulation. For this I need to double click an item in a SysTreeView32. I think the tree view was modified by autodesk. Because on the top level I can only expand the activated item. Activating another item causes some calculation.

 

Here you can sse the tree:

 

autodesk.png

 

 

This what i have so far (some sleeps and console print to check the script):

AutoIt         
  1. Func _Au3Setup()
  2.    Opt('WinDetectHiddenText',1)
  3.    Opt('MouseCoordMode',0)
  4.  
  5. Func _WinWaitActivate($title,$text,$timeout=10)
  6.     WinWait($title,$text,$timeout)
  7.     If Not WinActive($title,$text) Then WinActivate($title,$text)
  8.     WinWaitActive($title,$text,$timeout)
  9.  
  10.  
  11.  _Au3Setup()
  12.  _WinWaitActivate("Autodesk Simulation Mechanical 2013","")
  13.  
  14. ConsoleWrite (@CRLF & "WinWaitActive")
  15.  
  16. #Include <GuiTreeView.au3>
  17.  
  18. $hwnd = ControlGetHandle ( "Autodesk Simulation Mechanical", "", "[CLASS:SysTreeView32; INSTANCE:2]" )
  19. ControlTreeView  ( "Autodesk Simulation Mechanical", "", "[CLASS:SysTreeView32; INSTANCE:2]", "Expand", "#0" )
  20. ConsoleWrite (@CRLF & "Collapse")
  21. Sleep(1500)
  22. ControlTreeView  ( "Autodesk Simulation Mechanical", "", "[CLASS:SysTreeView32; INSTANCE:2]", "Expand", "#0|#8" )
  23. ConsoleWrite (@CRLF & "Expand")
  24. Sleep(1500)
  25. ControlTreeView  ( "Autodesk Simulation Mechanical", "", "[CLASS:SysTreeView32; INSTANCE:2]", "Select", "#0|#8" )
  26. ConsoleWrite (@CRLF & "Select")
  27. Sleep(1500)
  28.  
  29. $control=ControlTreeView  ( "Autodesk Simulation Mechanical", "", "[CLASS:SysTreeView32; INSTANCE:2]", "GetText", "#0|#8" )
  30.  
  31. _WinAPI_SetFocus(ControlGetHandle("Test", "", $hInput))
  32.  
  33. $find=_GUICtrlTreeView_FindItem ( $hwnd, $control )
  34. $bla=_GUICtrlTreeView_ClickItem ( $hwnd, $find, "left", False, 2 )
  35.  
  36. ConsoleWrite (@CRLF & $control)

AutoIt Info says:

Plain Text         
  1. >>>> Window <<<<
  2. Title:  Autodesk Simulation Mechanical 2013 - [Ergebnisse - [dynamische_lastffaelle : Stress]]
  3. Class:  AlgFrame_MainWindow
  4. Position:   -8, -8
  5. Size:   1936, 1056
  6. Style:  0x15CF0000
  7. ExStyle:    0x00000110
  8. Handle: 0x001F0AD6
  9.  
  10. >>>> Control <<<<
  11. Class:  SysTreeView32
  12. Instance:   2
  13. ClassnameNN:    SysTreeView322
  14. Name:  
  15. Advanced (Class):   [CLASS:SysTreeView32; INSTANCE:2]
  16. ID: 101
  17. Text:  
  18. Position:   10, 203
  19. Size:   435, 819
  20. ControlClick Coords:    255, 362
  21. Style:  0x5010002F
  22. ExStyle:    0x00000000
  23. Handle: 0x001508A4
  24.  
  25. >>>> Mouse <<<<
  26. Position:   265, 557
  27. Cursor ID:  0
  28. Color:  0xFFFFFF
  29.  
  30. >>>> StatusBar <<<<
  31. 1: 
  32. 2: 
  33. 3: 
  34. 4: 
  35. 5: 
  36.  
  37. >>>> ToolsBar <<<<
  38.  
  39. >>>> Visible Text <<<<
  40. Ergebnisse - [dynamische_lastffaelle : Stress]
  41. FEM-Editor - [dynamische_lastffaelle.fem]
  42. AdImpApplicationFrame
  43. QATHwndSource
  44. InfoCenterHwndSource
  45. RibbonBar
  46. RibbonHwndSource
  47. Autodesk Simulation Mechanical                                                                                                                                                              
  48. Autodesk Simulation Mechanical                                                                                                                                                              
  49.  
  50.  
  51. >>>> Hidden Text <<<<
  52. Fatigue Wizard
  53. Werkzeuge
  54. Geometrie
  55. Berechnung
  56. Automatische Vernetzungswerkzeuge
  57. Netz
  58. Optionen anzeigen
  59. Anzeigeoptionen
  60. Blickwinkel
  61. Auswahlform
  62. Bearbeiten
  63. Animation
  64. Allgemeine Optionen
  65. Schnittflächen
  66. Lastfall
  67. Ergebnisoptionen
  68. Anzeigeoptionen
  69. Auswahl
  70. Auswahlform
  71. Blickwinkel
  72. Actions
  73. Bearbeiten
  74. Fenster
  75. Datei
  76. Menueleiste

Thank you for your help!

 

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>