seanz123 Posted May 13, 2015 Share Posted May 13, 2015 (edited) I created a script to automate filling in information from our SAN at my company. I have completed what i want it to do but im sure there is an easier way of doing it. for example i have to make the script Sleep to wait for the java windows to load. Any thoughts or advice will be appreciated.expandcollapse popup;make active WinActivate("EMC Unisphere - Windows Internet Explorer") ;Move IE window MouseMove (587, 8, 1) MouseDown("Left") MouseMove(1880,181,3) MouseUp("Left") Sleep(3000) ;maximize WinSetState("[ACTIVE]", "", @SW_MAXIMIZE) Sleep(3500) ;Select FTPCNTCS0 MouseMove (1342, 194, 1) MouseClick("Left") Sleep(500) ;Select File Systems MouseMove (1782, 86, 1) Sleep(1700) MouseMove(1816,364,1) MouseClick("Left") Sleep(2400) ;Select Server------------------------------------------------------------ 1 MouseMove(1429,420,1) MouseClick("Left") MouseClick("Left") Sleep(9500) ;Move IE window MouseMove(629,170,1) MouseDown("Left") MouseMove(1880,181,3) MouseUp("Left") Sleep(2000) ;Copy Files Scanned MouseMove(2052,485,1) MouseDown("Left") MouseMove(1994,485,5) MouseUp("Left") MouseMove(2020,485,1) MouseClick("Right") sleep(300) MouseMove(2050,522,1) MouseClick("Left") sleep(1000) ; Create application object Local $oAppl = _Excel_Open() ; Open an existing workbook Local $sWorkbook = @ScriptDir & "\AutoSAN.xlsx" Local $oWorkbook = _Excel_BookOpen($oAppl, $sWorkbook, Default, Default, True) ;make active WinActivate("Microsoft Excel - SAN Monthly Reports.xlsx") Sleep(500) ;maximize WinSetState("[ACTIVE]", "", @SW_MAXIMIZE) Sleep(1000) $oWorkbook.ActiveSheet.Range("D11").Select() ;Paste Files Scanned MouseMove(249,172,1) MouseClick("Left") Send("{CTRLDOWN}v{CTRLUP}") Send("{TAB}") ;Copy Files Deduped MouseMove(2052,502,1) MouseDown("Left") MouseMove(1994,502,5) MouseUp("Left") MouseMove(2020,502,1) MouseClick("Right") sleep(300) MouseMove(2050,539,1) MouseClick("Left") ;Paste Files Deduped MouseMove(249,172,1) MouseClick("Left") Sleep(500) MouseClick("Left") Send("{CTRLDOWN}v{CTRLUP}") Send("{TAB}") Send("{TAB}") ;Copy Oirginal Data Size MouseMove(2052,519,1) MouseDown("Left") MouseMove(1994,519,5) MouseUp("Left") MouseMove(2020,519,1) MouseClick("Right") sleep(300) MouseMove(2050,556,1) MouseClick("Left") ;Paste Oirginal Data Size MouseMove(249,172,1) MouseClick("Left") Sleep(500) MouseClick("Left") Send("{CTRLDOWN}v{CTRLUP}") Send("{ENTER}") ;Close IE Window MouseMove(2319,178,1) MouseClick("Left") Edited May 13, 2015 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 13, 2015 Moderators Share Posted May 13, 2015 (edited) seanz123,When you post code please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags.M23 Edited May 13, 2015 by Melba23 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...
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