MovieScreener2013 Posted November 2, 2018 Share Posted November 2, 2018 I am trying to setup a build process and would like to have a banner up while the script is running so that anyone that looks at the screen will see a hands off message while the autoit script is executing. I put up a message box up at the beginning of my script but this is a simple Yes, No msgbox to allow them to proceed or exit out. Once they select Yes if there is a delay due to network lag they have no idea what's going on. I just want to put up a banner in the top left corner of the screen that let's them know autoIT is running and which script it is that is running. Thoughts? Oh and as a side not I was also trying to get filewritelog to work but that seems to be going down in a blaze of fire as well. HELP Please! Here is a sample of my script func: ==================================================================================================== W10AcrobatReaderInstall() Func W10AcrobatReaderInstall() #include <File.au3> AutoItSetOption('MouseCoordMode', 0) AutoItSetOption('SendKeyDelay', 300) Global $NetworkDrivePath = '\\NOAMSNYW024\Servicedesk\' Global $FSRPath = 'Field Service Repository 2018\software\' Global $W10AcrobatReader = 'Adobe_Acrobat_Reader_W10-Install\2018-11-02_StandAlone--AcroRdrDC1900820071_en_US.exe' ; Global $W10AcrobatReaderlog = '$env:temp\W10AcrobatReaderlog.txt' ; Global $W10AcrobatReaderlog = 'C:\Users\SperoT01\AppData\Local\Temp\W10AcrobatReaderlog.txt' ; Starting the logging for this script: ; Local $hFile = FileOpen(@ScriptDir & "W10AcrobatReaderlog.txt", 1) MsgBox(0, "AUTOMATION INFORMATION BOX", "THE ADOBE ACROBAT READER INSTALLER IS ABOUT TO START!") ; ShellExecute($NetworkDrivePath & $StaticFSRPath & $W10AcrobateReader) Run($NetworkDrivePath & $FSRPath & $W10AcrobatReader) ;_FileWriteLog($hFile, "Running Adobe Acrobat Reader DC Install") ; Write to the logfile passing the filehandle returned by FileOpen. ;FileClose($hFile) ; Close the filehandle to release the file. ; Start of Adobe Acrobate Reader Install setup. Sleep(500) WinWait("Open File - Security Warning") Sleep(500) WinActivate("Open File - Security Warning") Sleep(500) ControlClick("Open File - Security Warning", "", 'Button1', "left", 1) Sleep(1000) WinWait("Adobe Acrobat Reader", "Install") Sleep(500) WinActivate("Adobe Acrobat Reader") Sleep(1000) ControlClick("Adobe Acrobat Reader", "", 'Button4', "left", 1) Sleep(500) MsgBox(0, "AUTOMATION INFORMATION BOX", "THE ADOBE ACROBAT READER INSTALLER has finished installing") EndFunc ;==>W10AcrobatReaderInstall Link to comment Share on other sites More sharing options...
careca Posted November 2, 2018 Share Posted November 2, 2018 I would create a popup window. See the parameters of the window create for that. Let's go over 1 thing each time, and leave the log for latter. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
mikell Posted November 2, 2018 Share Posted November 2, 2018 It seems that SplashTextOn is exactly what you are looking for FrancescoDiMuro and MovieScreener2013 2 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 2, 2018 Moderators Share Posted November 2, 2018 MovieScreener2013, Or perhaps my Marquee UDF - the link is in my sig. 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...
BrewManNH Posted November 2, 2018 Share Posted November 2, 2018 Or my ProgressGUI would be useful, also linked in my signature If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
MovieScreener2013 Posted November 3, 2018 Author Share Posted November 3, 2018 (edited) Wow - Thanks everyone. I have some testing to do - a lot of great ideas. Ok - So the SplashTextOn - which is the easiest of course - was my first choice, however, I like learning so I am messing with some of the other suggestions. ProgressGUI - made my eyes hurt. I realise you were showing off all of the capabilities but wow that was a lot!!! Still trying to nail down all of the settings. Marquee - was also intense with settings and choices but seems like it's going to take me a while to understand all of the code... Window Create - seems like another good solution but again have to read more on it. I implemented SplashTextOn for the moment but now searching to add an exit button some how. I'm thinking a GuiCreate inside a GuiCreate?? Would this even work? I wonder.... Edited November 5, 2018 by MovieScreener2013 Link to comment Share on other sites More sharing options...
MovieScreener2013 Posted November 5, 2018 Author Share Posted November 5, 2018 OK so the Gui in Gui thing seems to work and gives me alot more functionality than the simple SplashTextOn however haven't figured out how to get the "Exit" function to work while the script is doing it's thing?? Any Idea's? Here is what I have: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\autoit\koda(designs)\automation_form1.kxf $Automation_Form1 = GUICreate("Automation", 397, 295, 0, 0) $Automation_Edit1 = GUICtrlCreateEdit("", 24, 8, 361, 73, BitOR($GUI_SS_DEFAULT_EDIT, $ES_CENTER)) GUICtrlSetData(-1, "PLEASE REFRAIN FROM USING THE KEYBOARD AND MOUSE!" & @LF & "----------------CUSTOMIZING----------------" & @LF & "----------INTERNET EXPLORER----------") $Pic1 = GUICtrlCreatePic("C:\Ignite.jpg", 0, 0, 396, 292) $Exit_Button1 = GUICtrlCreateButton("Exit", 160, 88, 75, 25) GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() GetSystemInfo() FileWriteExample() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GetSystemInfo() #include <Constants.au3> #include <msgboxconstants.au3> AutoItSetOption('MouseCoordMode', 0) AutoItSetOption('SendKeyDelay', 300) ;$msgboxoutput1 = MsgBox(32 + 4, "AUTOMATION INFORMATION BOX", "WELCOME. " & @LF & "This is a 20 second pause if you would like to exit now." & @LF & "PLEASE REFRAIN FROM USING THE KEYBOARD AND MOUSE ONCE YOU START!!" & @LF & "NOTE: You will have pauses between sections to opt out if you wish." & @LF & "SELECT - YES TO CONTINUE OR - NO TO EXIT NOW!!!", 20) ;If $msgboxoutput1 = 6 Then ; MsgBox(48 + 0, "AUTOMATION INFORMATION BOX", "You have selected to continue." & @LF &"ONCE AGAIN PLEASE DO NOT USE THE KEYBOARD OR MOUSE" & @LF & "THE AUTOMATION WILL CONTINUE IN 10 SECONDS.", 10) ShellExecute('powershell') Sleep(3000) $CopyPaste1 = 'Get-WmiObject -Class Win32_ComputerSystem > C:\MyComputerInfo.txt' ClipPut($CopyPaste1) Send('^v{ENTER}') Sleep(2000) $CopyPaste1 = 'exit' Sleep(1000) ClipPut($CopyPaste1) Send('^v{ENTER}') ; Exit ;ElseIf $msgboxoutput1 = 7 Then ; MsgBox(16 + 0, "AUTOMATION INFORMATION BOX", "YOU HAVE SELECTED -NO- THIS WILL EXIT YOU OUT OF THE HPDI!", 5) ; Exit ;EndIf EndFunc ;==>GetSystemInfo Link to comment Share on other sites More sharing options...
careca Posted November 5, 2018 Share Posted November 5, 2018 When it's doing it's thing, you cant stop it, unless you have checks under every line. Even if you set a hotkey, it'll only activate once it has exited the function. When do you want to exit? MovieScreener2013 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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