Jump to content

-Unsolved- ControlTreeView


Recommended Posts

The script that I have been working on is still growing as I take more and more things into consideration. One of those things is making sure the reports That I am running with this script are saved in the correct location.

I have looked through a bunch of different functions and I think the ControlTreeView is my best bet to select the proper network drive and folder to save this out to. My first question is am I right?

If I am correct the question then How would I properly format my item to select a particular folder. I'm not quite following the help file.

Edited by sriKnight

No, I'm not a programer.Yes, I am a noob.You know what the difference is between you and me?I make this look good.

Link to comment
Share on other sites

  • Moderators

sriKnight,

I would take a look at FileSelectFolder if I were you. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

all that did was create a popup with the folder name. It didn't select anything from my "save as" window......

No, I'm not a programer.Yes, I am a noob.You know what the difference is between you and me?I make this look good.

Link to comment
Share on other sites

  • Moderators

sriKnight,

You asked for something "to select the proper network drive and folder" - that is what the FileSelectFolder function does and why I suggested it. Now you speak of a "save as" window" - that is another thing altogether. ;)

What exactly do you want to do and what code do you have so far to do it? Is this "save as" window something you have coded in your script or a dialog in another app? Help us to help you by clearly explaining the problem - I could suggest possible solutions all night, but I get bored quickly when people keep changing the goalposts in mid-thread. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Ok....... Lets try this again.

I am writing a script that will navigate the software that my company uses to run reports every month. Process of my script is to log into the GUI, run a report(Crystal Reports), export to a pdf, and save that pdf to a folder on a network drive.

Here is most of my script( all I need to to is copy and paste 2 times and change some labels)

;;This is the window that shows when I elect to export and save my report. 
WinWaitActive("Export Report")
WinActivate("Export Report")
;saves the file
$hWnd = WinWait("Export Report", "")
;sets the file name to the current date.
ControlSetText($hWnd, "", "[CLASSNN:Edit1]", "TJC WIP_" & @MON & "-" & @MDAY & "-" & @YEAR)
;; Saves the file as a pdf
Sleep(700)
send("{TAB}")
sleep(700)
Send("{DOWN}")
sleep(700)
send("{DOWN}")
sleep(700)
Send("{ENTER}")

ControlClick($hWnd,"","[CLASSNN:Button1]")
WinActivate("Export Report", "Export completed.")
WinWaitActive("Export Report")
ControlClick("Export Report", "OK", 2, "left")

WinActivate("CORRIDOR")

Where I have run into issues is with the window that my software generates to save the file.

Problem #1 - I have having difficulties getting AutoIT to "cleanly" elect to save the file as a .pdf. I currently use keyboard navigation for this process. I have already created a thread for this issue, but I never got it resolved.

Here is the Information for that particular control ....

>>>> Window <<<<

Title: Export Report

Class: #32770

Position: -1452, 94

Size: 1102, 792

Style: 0x96CC02C4

ExStyle: 0x00010101

Handle: 0x0000000000AB1B74

>>>> Control <<<<

Class: ComboBox

Instance: 2

ClassnameNN: ComboBox2

Name:

Advanced (Class): [CLASS:ComboBox; INSTANCE:2]

ID:

Text:

Position: 125, 672

Size: 956, 23

ControlClick Coords: 165, 13

Style: 0x50030203

ExStyle: 0x00000000

Handle: 0x0000000000B11548

>>>> Mouse <<<<

Position: -1154, 809

Cursor ID: 0

Color: 0xDADADA

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

Namespace Tree Control

Tree View

Crystal Reports (*.rpt)

ShellView

&Save

Cancel

Address: W:\Corridor\Month End Reports

>>>> Hidden Text <<<<

Namespace Tree Control

&Help

Problem #2 - While saving the file I would like to specify the folder on a net work drive that this document will be saved to. This is done from the same window that the software we uses generates. Here is the control info for that System Tree.

>>>> Window <<<<

Title: Export Report

Class: #32770

Position: -1452, 94

Size: 1102, 792

Style: 0x96CC02C4

ExStyle: 0x00010101

Handle: 0x0000000000AB1B74

>>>> Control <<<<

Class: SysTreeView32

Instance: 1

ClassnameNN: SysTreeView321

Name:

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

ID: 100

Text: Tree View

Position: 1, 66

Size: 255, 571

ControlClick Coords: 109, 191

Style: 0x5601D22D

ExStyle: 0x00000000

Handle: 0x00000000005C0AEE

>>>> Mouse <<<<

Position: -1334, 381

Cursor ID: 0

Color: 0xFCFCFC

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

Namespace Tree Control

Tree View

Crystal Reports (*.rpt)

ShellView

&Save

Cancel

Address: W:\Corridor\Month End Reports

>>>> Hidden Text <<<<

Namespace Tree Control

&Help

No, I'm not a programer.Yes, I am a noob.You know what the difference is between you and me?I make this look good.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...