Sign in to follow this  
Followers 0
Mohit

hiding installation windows during my automated vlc install..

21 posts in this topic

i have created an script for automated install for vlc . It works fine but shows installation screens. My first question is how to hide these. Pls dnt tl me to use silent switches for vlc wat abt those which dnt Support switches. Pls explain with an example of automated install. Urgent held needed. Can post the script also.

Share this post


Link to post
Share on other sites



If you are using Control* functions rather than Send or MouseClick then it's a simple matter of using WinSetState with @SW_HIDE:

WinSetState("vlc", "", @SW_HIDE)

you will need to replace vlc with the actual window title.

Mat

Share this post


Link to post
Share on other sites

If you are using Control* functions rather than Send or MouseClick then it's a simple matter of using WinSetState with @SW_HIDE:

WinSetState("vlc", "", @SW_HIDE)

you will need to replace vlc with the actual window title.

Mat

Brother i am not familiar with the control* function. I am using send and mouseclick wat is the procedure then.

Share this post


Link to post
Share on other sites

Ok, then it is more complex. I'll explain the basics. If you know all this already then skip the next few paragraphs.

ControlClick and ControlSend are the same as MouseClick and Send, except instead of mimicking user input by moving the mouse etc. They send the messages straight to the controls. As a result, you don't need coordinates or anything like that, and the window doesn't need to be visible.

However, you need to tell the computer exactly what to click, and AutoIt has a number of ways you can do this: Handles, Id's, class names, and sometimes even .Net names.

To get these you use 'AutoIt Window Info'. It comes with the AutoIt install, and is under the start menu entry. The functions require a reference to the window, and then a reference to the control. Notepads main edit can be sent to like this:

ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window")

"[CLASS:Notepad]" is the window, and "Edit1" is the edit. We use classes as they don't usually change. If you tried to use handles it wouldn't work as the handle is never (or at least, not normally) the same.

Try using winfo on the vlc window and post your results. It should be easy enough to convert your current script to use the Control functions.

Alternatively, some of the macro recorders that are bundled with the full SciTE4AutoIt3 package use the Control functions, so you could use one of those instead.

Mat

Share this post


Link to post
Share on other sites

Ok, then it is more complex. I'll explain the basics. If you know all this already then skip the next few paragraphs.

ControlClick and ControlSend are the same as MouseClick and Send, except instead of mimicking user input by moving the mouse etc. They send the messages straight to the controls. As a result, you don't need coordinates or anything like that, and the window doesn't need to be visible.

However, you need to tell the computer exactly what to click, and AutoIt has a number of ways you can do this: Handles, Id's, class names, and sometimes even .Net names.

To get these you use 'AutoIt Window Info'. It comes with the AutoIt install, and is under the start menu entry. The functions require a reference to the window, and then a reference to the control. Notepads main edit can be sent to like this:

ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window")

"[CLASS:Notepad]" is the window, and "Edit1" is the edit. We use classes as they don't usually change. If you tried to use handles it wouldn't work as the handle is never (or at least, not normally) the same.

Try using winfo on the vlc window and post your results. It should be easy enough to convert your current script to use the Control functions.

Alternatively, some of the macro recorders that are bundled with the full SciTE4AutoIt3 package use the Control functions, so you could use one of those instead.

Mat

Thanks a LOT man i will try and post the results tommorow.

Share this post


Link to post
Share on other sites

Ok, then it is more complex. I'll explain the basics. If you know all this already then skip the next few paragraphs.

ControlClick and ControlSend are the same as MouseClick and Send, except instead of mimicking user input by moving the mouse etc. They send the messages straight to the controls. As a result, you don't need coordinates or anything like that, and the window doesn't need to be visible.

However, you need to tell the computer exactly what to click, and AutoIt has a number of ways you can do this: Handles, Id's, class names, and sometimes even .Net names.

To get these you use 'AutoIt Window Info'. It comes with the AutoIt install, and is under the start menu entry. The functions require a reference to the window, and then a reference to the control. Notepads main edit can be sent to like this:

ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window")

"[CLASS:Notepad]" is the window, and "Edit1" is the edit. We use classes as they don't usually change. If you tried to use handles it wouldn't work as the handle is never (or at least, not normally) the same.

Try using winfo on the vlc window and post your results. It should be easy enough to convert your current script to use the Control functions.

Alternatively, some of the macro recorders that are bundled with the full SciTE4AutoIt3 package use the Control functions, so you could use one of those instead.

Mat

Thanks a LOT man i will try and post the results tommorow.

Share this post


Link to post
Share on other sites

bro i got the concept but the script pauses in between with a notification noise. Cn u pls attach an example of silent install vlc any version i wl download that version from file hippo to test it.

Share this post


Link to post
Share on other sites

bro i got the concept but the script pauses in between with a notification noise. Cn u pls attach an example of silent install vlc any version i wl download that version from file hippo to test it.

I'll try it tommorrow, I don't want to be messing around with installs right now... I've got lots of work to do

Share this post


Link to post
Share on other sites

I'll try it tommorrow, I don't want to be messing around with installs right now... I've got lots of work to do

Thanks Man. I will post you the script of my other automation so u cn hide it make it less time wastage for u and make me understand it much more.

Share this post


Link to post
Share on other sites

I'll try it tommorrow, I don't want to be messing around with installs right now... I've got lots of work to do

Thanks Man. I will post you the script of my other automation so u cn hide it make it less time wastage for u and make me understand it much more.

Share this post


Link to post
Share on other sites

Thanks Man. I will post you the script of my other automation so u cn hide it make it less time wastage for u and make me understand it much more.

bro pls upload the script i am going nuts here tried everything.

Share this post


Link to post
Share on other sites

Thanks Man. I will post you the script of my other automation so u cn hide it make it less time wastage for u and make me understand it much more.

bro pls upload the script i am going nuts here tried everything.

Share this post


Link to post
Share on other sites

Thanks Man. I will post you the script of my other automation so u cn hide it make it less time wastage for u and make me understand it much more.

bro pls upload the script i am going nuts here tried everything.

Share this post


Link to post
Share on other sites

This worked:

Run("vlc-1.1.4-win32.exe")

WinWait("Installer Language", "")
WinSetState("Installer Language", "", @SW_HIDE)
ControlClick("Installer Language", "", "Button1")

WinWait("VLC media player 1.1.4 Setup", "")
WinSetState("VLC media player 1.1.4 Setup", "", @SW_HIDE)
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")

While ControlGetText("VLC media player 1.1.4 Setup", "", "Button2") <> "&Finish"
    Sleep(10)
WEnd

ControlClick("VLC media player 1.1.4 Setup", "", "Button4")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")

Share this post


Link to post
Share on other sites

This worked:

Run("vlc-1.1.4-win32.exe")

WinWait("Installer Language", "")
WinSetState("Installer Language", "", @SW_HIDE)
ControlClick("Installer Language", "", "Button1")

WinWait("VLC media player 1.1.4 Setup", "")
WinSetState("VLC media player 1.1.4 Setup", "", @SW_HIDE)
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")

While ControlGetText("VLC media player 1.1.4 Setup", "", "Button2") <> "&Finish"
 Sleep(10)
WEnd

ControlClick("VLC media player 1.1.4 Setup", "", "Button4")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")

oh i was using winwaitactive . U knw u rock Bro.

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

This worked:

Run("vlc-1.1.4-win32.exe")

WinWait("Installer Language", "")
WinSetState("Installer Language", "", @SW_HIDE)
ControlClick("Installer Language", "", "Button1")

WinWait("VLC media player 1.1.4 Setup", "")
WinSetState("VLC media player 1.1.4 Setup", "", @SW_HIDE)
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")

While ControlGetText("VLC media player 1.1.4 Setup", "", "Button2") <> "&Finish"
    Sleep(10)
WEnd

ControlClick("VLC media player 1.1.4 Setup", "", "Button4")
ControlClick("VLC media player 1.1.4 Setup", "", "Button2")

This not hiding? I can see installation screen. Edited by Read

Share this post


Link to post
Share on other sites

This not hiding? I can see installation screen.

It should be hiding it... Thats what this line is for:

WinSetState("VLC media player 1.1.4 Setup", "", @SW_HIDE)

Are you installing 1.1.4? If not then the title will be different.

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

It should be hiding it... Thats what this line is for:

WinSetState("VLC media player 1.1.4 Setup", "", @SW_HIDE)

Are you installing 1.1.4? If not then the title will be different.

Yes, vers: http://sourceforge.net/projects/vlc/files/1.1.4/win32/vlc-1.1.4-win32.exe/download

I see all progress, fast but i see :)

If is hiding why you don't use something like this?

MsgBox(0, "Complete Install", "VLC: In your computer")

Not good my English ;)

Edited by Read

Share this post


Link to post
Share on other sites

I don't understand how to use @SW_HIDE

Winzip tutorial: http://www.autoitscript.com/autoit3/docs/tutorials/winzip/winzip.htm

; Run the winzip installer
Run("winzip90.exe")

; Initial Setup Screen
WinSetState("WinZip® 9.0 SR-1 Setup""&Setup", "", @SW_HIDE) Now 
Send("!s")

; Install location
WinWaitActive("WinZip Setup", "into the following folder")
Send("{ENTER}")

; Features overview
WinWaitActive("WinZip Setup", "WinZip features include")
Send("!n")

; License agreement
WinWaitActive("License Agreement")
Send("!y")

; Quick start
WinWaitActive("WinZip Setup", "Quick Start Guide")
Send("!n")

; Choose interface
WinWaitActive("WinZip Setup", "switch between the two interfaces")
Send("!c")
Send("!n")

; Installation type (custom/express)
WinWaitActive("WinZip Setup", "&Express setup (recommended)")
Send("!e")
Send("!n")

; Select file associations
WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives")
Send("!n")

; Completed installation screen
WinWaitActive("WinZip Setup", "Thank you for installing this evaluation version")
Send("{ENTER}")

; Wait for winzip to load then close it
WinWaitActive("WinZip (Evaluation Version)")
WinClose("WinZip (Evaluation Version)")

Sry spam

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