Recommended Posts

microbious 0

microbious 0

So after i told script to press Enter when Window name is active the very same window name is whats coming next.

This gives me a problem with WinWait command because its the same window but it has different options.

Window info tool also tracks Class: but i dont know how to use that class and if its any good to replace Winwait with something else.

Next page of the installer is asking me if i want to upgrade or install old version.

This page contains TEXT radio buttons and back next cancel buttons so i wonder if i could tell autoit to make sure that text in this window "example text" exists and then do the action such as Send ("{keywhatever}")

At this point i am stuck.

Anyway autoit could search the window for text content and if found proceed to next ElseIf another command ?

What matters is that if winwaitactive confirms that text is there then i want it to go to another part of the script, not just next line what ever it is in this example.

I understand that at this point IF this is there then statement (what is statement anyway).

Can a statement be something that will tell script to (don't yell at me please i am very sensitive) somewhere in the code other then what ever comes next ?

Thanks again.

Oh yeah, Use of IF's elseif's in help file examples show use of only one statement (statement or command ? Anyway) so i am not even sure that after "Then" The send commands will be executed at all .

1. Your condition statement doesn't make sense. You tell the program to wait indefinitely until a window with x-text appears, but then you check conditions after that ?

2. I'm kind of baffled that you've been given the answer already, yet you persist to continue on wanting something you're just not going to get the way you want it (say that 10 times fast!! lol).

Bottom line, if you want to jump to another part of the script, then put that part into a function.

#Region;Update finder
Global $i_new_version_win = WinWaitActive ("","A newer version of DivX is available from DivX.com", 10); Time out for 10 seconds to make it realistic
If $i_new_version_win Then
_GoTo(0); Pretend it's a different line
Else
_GoTo(1)
EndIf
#EndRegion;Update found/notfound
Func _GoTo($i_num)
Switch $i_num
Case 0
; Do something for zero as if it were the line you were jumping to
MsgBox (0,"","Update requested by setup" & @CRLF & "Proceeding to next step", 2); 4th param isn't a string btw
Send ("{DOWN}{ENTER}")
Case 1
; Do something for 1 as if it were the line you were jumping to
MsgBox (0, "", "No update window." & @CRLF & "Proceeding to next step", 2)
Case Else; add more or don't
EndSwitch
; Return something even if you want to
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.