MSFN Forum: Autoit when the window has no name - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Autoit when the window has no name Rate Topic: -----

#1 User is offline   Swimming_Bird 

  • I want the NHL Back
  • PipPipPip
  • Group: Members
  • Posts: 378
  • Joined: 12-October 04

Posted 01 May 2005 - 12:08 AM

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?


#2 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

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:

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: Search "Window Titles and Text" in help and read the section regarding Advanced Mode. Maybe others can come up with a script example?

#3 User is offline   Swimming_Bird 

  • I want the NHL Back
  • PipPipPip
  • Group: Members
  • Posts: 378
  • Joined: 12-October 04

Posted 01 May 2005 - 12:48 PM

this is prolly pretty crappy coding but it got the job done

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 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

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. :lol:

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 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 01 May 2005 - 11:41 PM

blinkdt, on May 2 2005, 01:49 PM, said:

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

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. B)

#6 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

Posted 02 May 2005 - 12:34 AM

Touche, MHz. :D And thanks for the code, I'll give it a try.

#7 User is offline   [MaSteR] 

  • Group: Members
  • Posts: 4
  • Joined: 04-February 05

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 :).

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy