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?
Page 1 of 1
Autoit when the window has no name
#2
Posted 01 May 2005 - 03:01 AM
I think you need to set the script to run in Mode 4. From the AutoIt help file:
I know I have done it, but I'll be danged if I can find an example for you, sorry.
Search "Window Titles and Text" in help and read the section regarding Advanced Mode. Maybe others can come up with a script example?
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.
#3
Posted 01 May 2005 - 12:48 PM
this is prolly pretty crappy coding but it got the job done
i know nothing about autoit so this was even a strech for me.
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.
#4
Posted 01 May 2005 - 09:49 PM
Yeah, the problem with sleep is that it's always too long on a fast machine and never long enough on a slow machine.
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.:
and eject the CD after the install:
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.:
Those three, and a few others, have a place in my AutoIt snippet library.
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.:
Run( @ScriptDir & "\cleanup.cmd", "", @SW_HIDE)
and eject the CD after the install:
$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.:
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.
#5
Posted 01 May 2005 - 11:41 PM
blinkdt, on May 2 2005, 01:49 PM, said:
and eject the CD after the install:
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.
$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.
$driveArray = DriveGetDrive('CDROM')
If Not CDTray($driveArray[1], 'open') Then Shutdown(6)
Au3 aficionados benefit from learning more.
#6
Posted 02 May 2005 - 12:34 AM
Touche, MHz.
And thanks for the code, I'll give it a try.
#7
Posted 21 May 2005 - 07:26 PM
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
.
>>>>>>>>>>>> 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
Share this topic:
Page 1 of 1



Help

Back to top









