akira2891 Posted July 7, 2013 Share Posted July 7, 2013 Hi all im new in autoit so i want to know can i make something like this look on pic So i want when i choose programs and click on Start button to make install program 1 by 1 and in silent mode not to click next next etc... Can someone make me a little code with 1,2 programs just to see example. Thanks in advance Link to comment Share on other sites More sharing options...
TheSaint Posted July 7, 2013 Share Posted July 7, 2013 (edited) @ akira2891 - Someone could and someone probably will, but you would be better served to do a few of the >tutorials available here at the Forum (Examples section), and investigate some of the Examples in your AutoIt install folder, using the wonderful and enlightening Help file during the process. Edited July 7, 2013 by TheSaint Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
water Posted July 7, 2013 Share Posted July 7, 2013 (edited) Please have a look at the >Vollatran project. Maybe it already does what you are looking for or at least gives so some ideas. Edited July 7, 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...
akira2891 Posted July 7, 2013 Author Share Posted July 7, 2013 ok thx water i think its that what i need Link to comment Share on other sites More sharing options...
akira2891 Posted July 7, 2013 Author Share Posted July 7, 2013 So i need a bit help i made this and works good but when i cancel instalation of 1 program it goes to another as it need to, but when i cancel instalation on last file i get Msg Msgbox(0, "Error", "Please select programs to install", 0) i just tested on 2 programs and works fine here is code While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If _listPrograms() = 0 Then Msgbox(0, "Error", "Please select programs to install", 0) EndIf EndSwitch WEnd Func _listPrograms() If GUICtrlRead($winamp) = 1 Then ShellExecuteWait(@DesktopDir & "\Silent Auto Instaler\Programs\winamp_v.5.63.exe") EndIf If GUICtrlRead($klitecodecpack) = 1 Then ShellExecuteWait(@DesktopDir & "\Silent Auto Instaler\Programs\k_Lite_codec_pack_8.60_Full.exe") EndIf EndFunc and do i make this good or on bad way ? Link to comment Share on other sites More sharing options...
TheSaint Posted July 7, 2013 Share Posted July 7, 2013 (edited) You are kind of on the right track, but here is a more effective but simple way. Global $installed While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $installed = "" _listPrograms() If $installed = "" Then Msgbox(0, "Error", "Please select programs to install", 0) EndIf EndSwitch WEnd Func _listPrograms() If GUICtrlRead($winamp) = 1 Then ShellExecuteWait(@DesktopDir & "\Silent Auto Instaler\Programs\winamp_v.5.63.exe") $installed = 1 EndIf If GUICtrlRead($klitecodecpack) = 1 Then ShellExecuteWait(@DesktopDir & "\Silent Auto Instaler\Programs\k_Lite_codec_pack_8.60_Full.exe") $installed = 1 EndIf EndFunc Sorry about the way this forum formats things ... very annoying without TAB. Edited July 7, 2013 by TheSaint Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
water Posted July 7, 2013 Share Posted July 7, 2013 (edited) ShellExecuteWait returns the exit code of the program that was run. So you need to check if the program you run returns a different value if cancelled. Edited July 7, 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...
akira2891 Posted July 7, 2013 Author Share Posted July 7, 2013 @TheSaint thnx your code work fine and now no error @water how to do that ? but is that needed if code work fine and without error now ? Link to comment Share on other sites More sharing options...
water Posted July 7, 2013 Share Posted July 7, 2013 If your script now does what you need then just forget my post 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