Jump to content

Need help with one program


Recommended Posts

Hi all im new in autoit so i want to know can i make something like this look on pic

s6sjly.jpg

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

@ 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 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)

userbar.png

Link to comment
Share on other sites

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 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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

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 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)

userbar.png

Link to comment
Share on other sites

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 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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...