Swimming_Bird Posted May 1, 2005 Share Posted May 1, 2005 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? Link to comment Share on other sites More sharing options...
blinkdt Posted May 1, 2005 Share Posted May 1, 2005 I think you need to set the script to run in Mode 4. From the AutoIt help file: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. Search "Window Titles and Text" in help and read the section regarding Advanced Mode. Maybe others can come up with a script example? Link to comment Share on other sites More sharing options...
Swimming_Bird Posted May 1, 2005 Author Share Posted May 1, 2005 this is prolly pretty crappy coding but it got the job doneRun ("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. Link to comment Share on other sites More sharing options...
blinkdt Posted May 2, 2005 Share Posted May 2, 2005 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.: 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 ExitLoopNextIf NOT $opened ThenShutdown(6)EndIfI 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. Link to comment Share on other sites More sharing options...
MHz Posted May 2, 2005 Share Posted May 2, 2005 and eject the CD after the install:$driveArray = StringSplit("DEFGHIJKLMNOPQRSTUVWXYZ", "")For $i = 1 To 23$opened = CDTray($driveArray[$i] & ":", "open")If $opened Then ExitLoopNextIf NOT $opened ThenShutdown(6)EndIfI suspect Au3 aficionados are going to scream, but those are the only two features that I prize, together with the cleaner looking message boxesThose 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. B) Link to comment Share on other sites More sharing options...
blinkdt Posted May 2, 2005 Share Posted May 2, 2005 Touche, MHz. And thanks for the code, I'll give it a try. Link to comment Share on other sites More sharing options...
[MaSteR] Posted May 22, 2005 Share Posted May 22, 2005 I think your talking about this for a window without a Title:>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Class: #XXXXSize >>>>>>>>>>>>>>>>>>>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 controlControlClick($handle, "", "Button3")End of example;Hope that helps . Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now