OdinsPath Posted June 15, 2013 Share Posted June 15, 2013 Hey guys , I was going through just the basic tutorial http://www.autoitscript.com/autoit3/docs/tutorials/winzip/winzip.htm I downloaded Winzip the setup file is called WinZip175.exe so I wrote...... ; Run the application named WinZip175 with the extension .exe Run("WinZip175.exe") However the program wont execute I'm assuming is because of this windows are you sure ? are you sure your sure !?! way if building an operating system . Is that the cause ?, Do others have this problem ? Thanks Ben 'It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.' Sherlock Holmes Quote -A Scandal in Bohemia Link to comment Share on other sites More sharing options...
water Posted June 15, 2013 Share Posted June 15, 2013 As you can see from the tutorial it was written or Winzip 9.0. You try to install Winzip 17.5. I assume a lot of things have changed. If you just want to install Winzip then have a look for the command line options of the installer to do a silent install. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
OdinsPath Posted June 15, 2013 Author Share Posted June 15, 2013 (edited) Oki Doki, Cheers! Do you know of any sources for tutorials and the like ?. Thanks Ben Edited June 15, 2013 by OdinsPath 'It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.' Sherlock Holmes Quote -A Scandal in Bohemia Link to comment Share on other sites More sharing options...
water Posted June 15, 2013 Share Posted June 15, 2013 Here is a KB article about how to install WinZIP silently. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
OdinsPath Posted June 15, 2013 Author Share Posted June 15, 2013 Thanks Water , I wasn't really concerned with WinZip specifically I was more interested in just getting to know Autoit 'It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.' Sherlock Holmes Quote -A Scandal in Bohemia Link to comment Share on other sites More sharing options...
BrewManNH Posted June 15, 2013 Share Posted June 15, 2013 This would be the perfect way to learn it. Figure out what it's looking for, by examing each command in the demo and finding out what it does in the help file, then change it until it works correctly. You learn a LOT more fixing things that should work than trying to follow along with a static demo. 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...
Solution OdinsPath Posted June 15, 2013 Author Solution Share Posted June 15, 2013 (edited) This would be the perfect way to learn it. Figure out what it's looking for, by examing each command in the demo and finding out what it does in the help file, then change it until it works correctly. You learn a LOT more fixing things that should work than trying to follow along with a static demo. mmmmm, I agree with you 100% Any who as suspected it was due to the MS UAC being a douche bag , adding #RequireAdmin did the trick ; insure's the script has full permissions. #RequireAdmin ; Run the application named WinZip175 with the extension .exe Run("WinZip175.exe") Edited June 15, 2013 by OdinsPath 'It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.' Sherlock Holmes Quote -A Scandal in Bohemia Link to comment Share on other sites More sharing options...
water Posted June 15, 2013 Share Posted June 15, 2013 Good practice is to add some error checking to your script. Every function of AutoIt sets the return value or the macro @error if an error occurs. This helps in pinpoint the cause of the problem. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
OdinsPath Posted June 15, 2013 Author Share Posted June 15, 2013 (edited) I am rather new, how would i display the contents of @error for review if need be ? Edited June 15, 2013 by OdinsPath 'It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.' Sherlock Holmes Quote -A Scandal in Bohemia Link to comment Share on other sites More sharing options...
BrewManNH Posted June 15, 2013 Share Posted June 15, 2013 You can use ConsoleWrite("Error = " & @error & @CRLF) You have to also be aware that @error changes after every function called or command used, so you have to check the error returned in the very next line after what you want to check for errors. 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...
water Posted June 15, 2013 Share Posted June 15, 2013 (edited) Check the function in the help file if it sets the return value or @error. ControlSend returns 1 if successful. So: $iReturn = ControlSend(...) If $iReturn = 0 Then Exit Msgbox(16, "Error", "ControlSend was not successful!") _ArrayDisplay sets @error. Example: _ArrayDisplay($aValues) If @error Then MsgBox(16, "Error", "_ArrayDisplay returned error: " & @error) Edited June 15, 2013 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 15, 2013 Moderators Share Posted June 15, 2013 OdinsPath, You can use either ConsoleWrite (if you run from SciTE then the value appears in the lower pne) or MsgBox. In either case you need to access @error immediately after the function in question as it is reset by any subsequent commands: ; A test function $cButton = GUICtrlCreateButton("", 1, 1, 1, 1) ; Show the error returned ConsoleWrite("The error value returned was: " & @error & @CRLF) ; But if we try to access it again ConsoleWrite("The error value now is: " & @error & @CRLF) ; Because it was reset by the first ConsoleWrite Or you can save it to a variable, of course: ; A test function $cButton = GUICtrlCreateButton("", 1, 1, 1, 1) ; Save the value to a variable $iError = @error ; Show the error returned MsgBox(0, "Error", "The error value returned was: " & $iError) ; And now if we try to access it again MsgBox(0, "Error", "The error value returned was: " & $iError) ; And the same value is returned All clear? 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...
OdinsPath Posted June 15, 2013 Author Share Posted June 15, 2013 Yup all good guys thanks. 'It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.' Sherlock Holmes Quote -A Scandal in Bohemia Link to comment Share on other sites More sharing options...
water Posted June 15, 2013 Share Posted June 15, 2013 Another good source of AutoIt wisdom is the wiki with lots of tutorials. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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