Jump to content

if window not active go next line


Recommended Posts

Je ne suis pas sure que j'ai compris ce que t'as dis...

While 1
    If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then
  If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then
   If WinExists("Installation de Adobe Shockwave Player ", "Successfully Completed") Then
    _MyFunc3()
   EndIf
  Else
   _MyFunc2()
  EndIf
 Else
  _MyFunc1()
 EndIf
WEnd
Func _MyFunc1()
    BlockInput(1)
    ControlCommand("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :", "Button3", "Check")
    BlockInput(0)
EndFunc
Func _MyFunc2()
    BlockInput(1)
    ControlCommand("Installing Adobe Shockwave Player", "", "Button1", "UnCheck")
    ControlCommand("Installing Adobe Shockwave Player", "", "Button2", "UnCheck")
    ControlCommand("Installing Adobe Shockwave Player", "", "Button3", "UnCheck")
    Send("{ENTER}")
    BlockInput(0)
EndFunc
Func _MyFunc3()
    BlockInput(1)
    ControlCommand("Installation de Adobe Shockwave Player ", "Successfully Completed", "Button2", "Check")
    BlockInput(0)
EndFunc
Edited by AutID
Link to comment
Share on other sites

 

Je ne suis pas sure que j'ai compris ce que t'as dis...

While 1
    If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then
  If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then
   If WinExists("Installation de Adobe Shockwave Player ", "Successfully Completed") Then
    _MyFunc3()
   EndIf
  Else
   _MyFunc2()
  EndIf
 Else
  _MyFunc1()
 EndIf
WEnd
Func _MyFunc1()
    BlockInput(1)
    ControlCommand("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :", "Button3", "Check")
    BlockInput(0)
EndFunc
Func _MyFunc2()
    BlockInput(1)
    ControlCommand("Installing Adobe Shockwave Player", "", "Button1", "UnCheck")
    ControlCommand("Installing Adobe Shockwave Player", "", "Button2", "UnCheck")
    ControlCommand("Installing Adobe Shockwave Player", "", "Button3", "UnCheck")
    Send("{ENTER}")
    BlockInput(0)
EndFunc
Func _MyFunc3()
    BlockInput(1)
    ControlCommand("Installation de Adobe Shockwave Player ", "Successfully Completed", "Button2", "Check")
    BlockInput(0)
EndFunc

not working. it must winwaitactive window1 but while waiting window1 if come window 2 go for window2 and next script

Link to comment
Share on other sites

Please if you are french explain it in french or we won't be able to come up with a solution....

You also have the french autoit forum.

Br, FireFox.

My english is bad. i wrote what i want. " script must wait window1 but while waiting window1 if come window 2 go to window2 and next line" is it hard understand?

Link to comment
Share on other sites

Yes it's hard, it's not proper english.

If I translate what you wrote it gives:

Script doit attendre window1 mais pendant qu'il attend window1 si vient window2 alors aller à window2 et prochaine ligne.
Edited by FireFox
Link to comment
Share on other sites

Yes it's hard, it's not proper english.

If I translate what you wrote it gives:

Script doit attendre window1 mais pendant qu'il attend window1 si vient window2 alors aller à window2 et prochaine ligne.

i have not write this ? "Script doit attendre window1 mais pendant qu'il attend window1 si vient window2 alors aller à window2 et prochaine ligne."

Link to comment
Share on other sites

  • Moderators

bordomavi,

 

i am still waiting help

You keep getting offered scripts and then saying that they do not do what you want - so complaining will make you no new friends. ;)

I have read through the thread and, like the others, I am not at all sure what you are trying to do. I suggest you write it out as a logic flow rather than AutoIt code - perhaps that will make it easier to understand. Something like this:

Run install app

Wait for a particular window with text "#########"
If this window appears then
    do ~~~~~~~~ and move on to point 1
But if another window with text "@@@@@@@@@" appears first then
    do ++++++++++++++ and move on to point 1

;point 1
and now carry on from here
The above is what I think you are asking - but even if it is not, I hope you can see how much clearer that is that the short sentences you have been using so far. :)

So over to you - but please stop early bumping your thread, twice is quite enough. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

@lionfaggot

Is it a personnal choice or do you think that the second parameter of the WinExists function is needed if you set it to an empty string?

Br, FireFox.

hm, i assumed these window functions require this. i remember ages ago using it without that and it gave me incorrect parameters or somesuch. though looking through the helpfile i can now see it is not required. i dunno why i do that. good point

Link to comment
Share on other sites

While (True)
 If Not WinActive("window1") Then
  If WinActive("window2") Then
   If Not WinActive("window3") Then
    _MyFunc2()
   EndIf
  EndIf
  If WinActive("window3") Then
   If Not WinActive("window2") Then
    _MyFunc3()
   EndIf
  EndIf
 Else
  _MyFunc1()
 EndIf
 Sleep(100)
WEnd
Func _MyFunc1()
    ConsoleWrite("Window 1 exists" & @CRLF)
EndFunc
Func _MyFunc2()
   ConsoleWrite("Window 2 exists" & @CRLF)
EndFunc
Func _MyFunc3()
    ConsoleWrite("Window 3 exists" & @CRLF)
EndFunc

Edited by AutID
Link to comment
Share on other sites

i want different. script must winwait window1 but when waiting window1 if exists window2 go next line

This is my last try at figuring out what you are asking for.  Based on the above, I have to believe this does what you state:

While Not WinExists("Window 1")
    If WinExists("Window 2") Then ExitLoop
    Sleep(10)
WEnd
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...