Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

  On 9/22/2010 at 8:47 AM, 'Mat said:

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.
Posted

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

Posted

  On 9/22/2010 at 3:28 PM, 'Mat said:

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.
Posted

  On 9/22/2010 at 3:28 PM, 'Mat said:

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.
Posted

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.

Posted

  On 9/22/2010 at 9:00 PM, 'Mohit said:

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
Posted

  On 9/22/2010 at 9:42 PM, 'Mat said:

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.
Posted

  On 9/22/2010 at 9:42 PM, 'Mat said:

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.
Posted

  On 9/23/2010 at 4:21 AM, 'Mohit said:

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.
Posted

  On 9/23/2010 at 4:21 AM, 'Mohit said:

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.
Posted

  On 9/23/2010 at 4:21 AM, 'Mohit said:

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.
Posted

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

  On 9/24/2010 at 9:33 PM, 'Mat said:

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.
Posted (edited)

  On 9/24/2010 at 9:33 PM, 'Mat said:

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
Posted

  On 9/25/2010 at 8:28 AM, 'Read said:

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.

Posted (edited)

  On 9/25/2010 at 10:50 AM, 'Mat said:

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
Posted

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

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
  • Recently Browsing   0 members

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