llewxam Posted October 29, 2009 Share Posted October 29, 2009 As part of an auto installer for Spybot I would like to be able to read the immunization progressbar and use it to time when scanning current immunizations is done, and when applying new immunizations is done. I hate using their silent or update switches, it seems harder to time Spybot by which processes are running and have quit than to just apply a 45-second timer to scanning and applying immunizations and just forcing quiting as I do currently. I'd be happy to share my current (fully functional) code for Spybot if requested. For now though, I have been trying to use ControlCommand to get the status of the progressbar, the only options I can get to give me a good result are IsVisible and IsEnabled, so this is most likely not the right command, and help would be great. Current (almost worthless) code I have for this is: $test=ControlCommand ( "Spybot - Search & Destroy", "", "[id:2360984]", "IsVisible" ,"") msgbox(0,"test",$test) Once I got it to give a result on the status of immunization that looked worth a darn I was going to switch to a TrayTip so I could see the progress go, as proof it was working properly, then from there I can better time my auto installer. Thanks for any help! Ian My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 3, 2009 Moderators Share Posted November 3, 2009 llewxam,From what I can find out there is no function or UDF that can read the value from an external app's progress bar. However, I do have the following suggestions which you might find useful (the first is a bit tongue-in-cheek, but I have seen sillier things! ):1. Use ControlGetPos on the progress bar and then use PixelGetColor to work out where the colour change is. 2. If any of the controls in the app change as the progress bar reaches the end (Start/Stop button, Status bar, even the progress bar itself since you mention that IsEnabled gives you a return) you could at least use a marquee style progress bar until that happens to show that something is going on.#include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE) _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndSorry I cannot be of more help. 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...
llewxam Posted November 3, 2009 Author Share Posted November 3, 2009 llewxam, From what I can find out there is no function or UDF that can read the value from an external app's progress bar. However, I do have the following suggestions which you might find useful (the first is a bit tongue-in-cheek, but I have seen sillier things! ): 1. Use ControlGetPos on the progress bar and then use PixelGetColor to work out where the colour change is. 2. If any of the controls in the app change as the progress bar reaches the end (Start/Stop button, Status bar, even the progress bar itself since you mention that IsEnabled gives you a return) you could at least use a marquee style progress bar until that happens to show that something is going on. #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE) _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Sorry I cannot be of more help. M23 No, as always you were helpful, thanks. I was kinda thinking about suggestion 1, but just assumed something more "elegant" could be done..... Thanks again Ian My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
storme Posted November 3, 2009 Share Posted November 3, 2009 Hi Ian I've been working on a spybot "handler" for a while now. I'm at the stage I've got it handling all popups that occur during install, initial run, update (one popup to go I think). I'm aiming for a script that will handle everything without human intervention (download, install, update, run, uninstall). Anyway the solution I found to check for end of imunisation or UNDO was to close the spybot window. Spybot doesn't allow it to be closed untill the process is complete. ;Close window when imunization is complete WinClose("Spybot - Search & Destroy", "") While WinExists("Spybot - Search & Destroy", "") Sleep(1000) WEnd Not elegent but works. I wouldn't mind seeing your code to see if it covers everything I need. It may save me a lot of time. Thanks John Morrison AKA Storm-E Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
Bert Posted November 3, 2009 Share Posted November 3, 2009 Both the installer and main exe have command line support. You won't need to track the install. Here is the list:Here is a list of command line parameters that the Spybot-S&D installer supports:/sp-Will skip the first page of the installation wizard (Do you wish to continue? ...) /silentWill display the progress during installation, but not the wizard. /verysilentEven the progress will not be shown. Errors etc. would still be shown. /surpressmsgboxesWill use standard actions for message boxes (no overwriting of files, cancelling where the alternative would be retrying...) /log (or /log="filename")Creates a log file in the temp folder that contains detailed information about actions taking place during the installation. /nocancelDisables the Cancel and Close button. Useful with /silent. /norestartSuppress reboots even if they were necessary at the end of the installation. /restartexitcode=NIf a restart is needed, the setup would return the specified exit code. /loadinf="filename" (and /saveinf="filename")Can be used to use a saved setup configuration (or save one). /lang=languageOverrides the language dialog with a predefined language. Use ISO 2 letter language describers here. /dir="x:\dirname"Installs into that directory instead of the default one. /group="folder name"Installs into a program group of that name instead of the default one. /noiconsAvoids creation of any icons for the installed software. /type=typenameStarts installation with a give type. Supported types are full, blind and compact. /components="comma separated list of component names"Installs the given components instead of the default ones. Supported components are main, blind (icons for blind users), language (all language files), skins, updatedl (for downloading updates as part of the installation), updatew95 (to download prerequisites on Windows 95), SDWinSec (to install the Security Center integration on Vista), SDShredder (to install the stand-alone shredder), and SDDelFile (to install the file removal helper). /tasks="comma separated list of tasks"Specifies a list of tasks that should be executed. Tasks currently supported are: desktopicon quicklaunchicon launchsdhelper launchteatimer /mergetasks="comma separated list of tasks"Same as /tasks, just with the exception that standard tasks are not disabled by default. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
llewxam Posted November 3, 2009 Author Share Posted November 3, 2009 @Volly: Only speaking for myself here, but as I said in the first post I hate using their commandline switches with my installer because it handles more than Spybot, and figuring out when it is finished based on which processes have started/are running/have quit was more trouble than it was worth..... On it's own I'm sure it is helpful to some, but not me @storme Long time no see/hear/type/whatever I haven't touched that other project of ours in a while, I had to make some changes to the main app and haven't gone back to fix everything up yet..... Anyway, what I do currently for SB is: expandcollapse popup$timedelay=250 Run(@tempdir&"\TechFaves\Spyware Removal\spybotsd162.exe") winwait("Select Setup Language","Cancel") WinActivate("Select Setup Language","Cancel") sleep($timedelay) send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","Welcome to the Spybot - Search & Destroy Setup") WinActivate("Setup - Spybot - Search & Destroy","Welcome to the Spybot - Search & Destroy Setup") sleep($timedelay) send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","Please read the following important information") WinActivate("Setup - Spybot - Search & Destroy","Please read the following important information") sleep($timedelay) send("!a") sleep($timedelay) send("{ENTER}") DirRemove(@ProgramFilesDir&"\Spybot - Search & Destroy") winwait("Setup - Spybot - Search & Destroy","To continue, click Next. If you would like to select") WinActivate("Setup - Spybot - Search & Destroy","To continue, click Next. If you would like to select") sleep($timedelay) send("{ENTER}") sleep(500) if WinExists("Folder Exists") then send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","Select the components you want to install") WinActivate("Setup - Spybot - Search & Destroy","Select the components you want to install") sleep($timedelay) send("{TAB}") sleep($timedelay) send("{DOWN 5}") sleep($timedelay) send("{SPACE}") sleep($timedelay) send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","To continue, click Next. If you would like to select") WinActivate("Setup - Spybot - Search & Destroy","To continue, click Next. If you would like to select") sleep($timedelay) send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","Select the additional tasks you would like Setup") WinActivate("Setup - Spybot - Search & Destroy","Select the additional tasks you would like Setup") sleep($timedelay) send("{DOWN}") sleep($timedelay) send("{SPACE}") sleep($timedelay) send("{DOWN 2}") sleep($timedelay) send("{SPACE}") sleep($timedelay) send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","Click Install to continue with the installation, or click") WinActivate("Setup - Spybot - Search & Destroy","Click Install to continue with the installation, or click") sleep($timedelay) send("{ENTER}") winwait("Setup - Spybot - Search & Destroy","Setup has finished installing Spybot - Search") WinActivate("Setup - Spybot - Search & Destroy","Setup has finished installing Spybot - Search") sleep($timedelay) send("{SPACE}") sleep($timedelay) send("{ENTER}") ;regular install done run(@ProgramFilesDir&"\Spybot - Search & Destroy\SDUpdate.exe") winwait("Spybot-S&D Updater","Display beta updates") WinActivate("Spybot-S&D Updater","Display beta updates") sleep($timedelay) send("!s") sleep(2000) sleep($timedelay) send("!c") sleep(2000) sleep($timedelay) send("!d") winwait("Legal stuff") WinActivate("Legal stuff") sleep($timedelay) send("{TAB}") sleep($timedelay) send("{SPACE}") sleep($timedelay) send("{ENTER}") winclose("Spybot-S&D Updater") winwait("Spybot-S&D Wizard") WinActivate("Spybot-S&D Wizard") winclose("Spybot-S&D Wizard");end update sleep(1000) if winexists("Confirm","Ignore") then winactivate("Confirm","Ignore") twice)") sleep($timedelay) send("{TAB 2}") sleep($timedelay) send("{ENTER}") endif winactivate("Spybot - Search & Destroy") sleep(1000) sleep($timedelay) send("!i") $sbmessage="Allowing 45 seconds for Spybot to detect current immunizations."&@cr&"45 seconds remaining" SplashTextOn("Please Wait",$sbmessage,500,75) for $sb=44 to 1 step -1 ControlSetText("Please Wait","","Static1",$sbmessage) sleep(1000) $sbmessage="Allowing 45 seconds for Spybot to detect current immunizations."&@cr&$sb&" seconds remaining" next sleep($timedelay) send("!i") winactivate("Spybot - Search & Destroy") $sbmessage="Allowing 45 seconds for Spybot to apply new immunizations."&@cr&"45 seconds remaining" for $sb=44 to 1 step -1 ControlSetText("Please Wait","","Static1",$sbmessage) sleep(1000) $sbmessage="Allowing 45 seconds for Spybot to apply new immunizations."&@cr&$sb&" seconds remaining" next SplashOff() ProcessClose("spybotsd.exe") Hopefully that helps. Ian My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
llewxam Posted November 3, 2009 Author Share Posted November 3, 2009 Just as an FYI for those interested, the following works to detect the presence of the progressbar and the dimensions: $bar=ControlCommand ( "Spybot - Search & Destroy", "", "[class:TProgressBar]", "IsEnabled" ,"") if $bar=1 Then $test=ControlGetPos("Spybot - Search & Destroy", "", "[class:TProgressBar]") msgbox(0,"h",$test[0]&" "&$test[1]&" "&$test[2]&" "&$test[3]&" ") endif So once again thanks M23! The rest should be cake. Ian My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. 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