Help - Search - Members - Calendar
Full Version: Autoit when the window has no name
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   


Google Internet Forums Unattended CD/DVD Guide
Swimming_Bird
I'm trying to make an autoit script but the window i want to manipulate has no title. Is there any way to select it?
blinkdt
I think you need to set the script to run in Mode 4. From the AutoIt help file:
QUOTE
In this mode special sequences are used in the title parameter so that window classnames and handles can be used.

I know I have done it, but I'll be danged if I can find an example for you, sorry. no.gif Search "Window Titles and Text" in help and read the section regarding Advanced Mode. Maybe others can come up with a script example?
Swimming_Bird
this is prolly pretty crappy coding but it got the job done

CODE
Run ("Setup.exe")
Sleep (50000)
WinWait ( "" , "Introduction"  )
Sleep (10000)
ProcessClose ( "setup.exe" )
ProcessClose ( "setup.exe" )


i know nothing about autoit so this was even a strech for me.
blinkdt
Yeah, the problem with sleep is that it's always too long on a fast machine and never long enough on a slow machine. laugh.gif

Which program are you working with? I'd be happy to take a look if I can help.

I still use the "old" version of AutoIt for about half of my scripts, as Au3 appears so convoluted to a non-coder like me. Au3 does have its moments, however, like its ability to completely hide batch files, e.g.:
CODE
Run( @ScriptDir & "\cleanup.cmd", "", @SW_HIDE)

and eject the CD after the install:
CODE
$driveArray = StringSplit("DEFGHIJKLMNOPQRSTUVWXYZ", "")
For $i = 1 To 23
$opened = CDTray($driveArray[$i] & ":", "open")
If $opened Then ExitLoop
Next
If NOT $opened Then
Shutdown(6)
EndIf

I suspect Au3 aficionados are going to scream, but those are the only two features that I prize, together with the cleaner looking message boxes, e.g.:
CODE
SplashTextOn("", "" & @CRLF & "Installing Microsoft Money 2005 Premium..."  & @CRLF & ""   & @CRLF & "Please wait..."  & @CRLF & "", 275, 90, -1, -1, 1, "Arial", 12, 12)
Sleep(4000)
SplashOff()


Those three, and a few others, have a place in my AutoIt snippet library.
MHz
QUOTE (blinkdt @ May 2 2005, 01:49 PM)
and eject the CD after the install:
CODE
$driveArray = StringSplit("DEFGHIJKLMNOPQRSTUVWXYZ", "")
For $i = 1 To 23
$opened = CDTray($driveArray[$i] & ":", "open")
If $opened Then ExitLoop
Next
If NOT $opened Then
Shutdown(6)
EndIf

I suspect Au3 aficionados are going to scream, but those are the only two features that I prize, together with the cleaner looking message boxes

Those three, and a few others, have a place in my AutoIt snippet library.


Eject CD with just the necessary code.
CODE
$driveArray = DriveGetDrive('CDROM')
If Not CDTray($driveArray[1], 'open') Then Shutdown(6)

Au3 aficionados benefit from learning more. cool.gif
blinkdt
Touche, MHz. biggrin.gif And thanks for the code, I'll give it a try.
[MaSteR]
I think your talking about this for a window without a Title:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:
Class: #XXXX
Size
>>>>>>>>>>>>>>>>>>>

Start of Example:

AutoItSetOption("WinTitleMatchMode", 4)

; Get the handle window for a
$handle = WinGetHandle("classname=#XXXX")
; Send some text directly to this window's edit control
ControlClick($handle, "", "Button3")

End of example;

Hope that helps smile.gif.




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.