sriKnight Posted May 8, 2012 Share Posted May 8, 2012 (edited) 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 May 11, 2012 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 More sharing options...
Moderators Melba23 Posted May 8, 2012 Moderators Share Posted May 8, 2012 sriKnight,I would take a look at FileSelectFolder if I were you. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
sriKnight Posted May 8, 2012 Author Share Posted May 8, 2012 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 More sharing options...
Moderators Melba23 Posted May 8, 2012 Moderators Share Posted May 8, 2012 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
sriKnight Posted May 8, 2012 Author Share Posted May 8, 2012 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 More sharing options...
sriKnight Posted May 14, 2012 Author Share Posted May 14, 2012 I am still having trouble figuring these issues out..... 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 More sharing options...
Zedna Posted May 14, 2012 Share Posted May 14, 2012 Maybe this will give you idea how to achieve your goal ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now