Sign in to follow this  
Followers 0
akira2891

Need help with one program

9 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ok thx water i think its that what i need

Share this post


Link to post
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 ?

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0