Jump to content
Sign in to follow this  
bordomavi

if window not active go next line

Recommended Posts

AutID

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

Share this post


Link to post
Share on other sites
bordomavi

 

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

Share this post


Link to post
Share on other sites
FireFox

Why aren't you able to translate the mechanism in expressions?


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
bordomavi

Why aren't you able to translate the mechanism in expressions?

i dont understand you

Share this post


Link to post
Share on other sites
FireFox

Me neither.

From what you explained, danwilli's example do what you want.

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

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.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
bordomavi

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?

Share this post


Link to post
Share on other sites
FireFox

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
bordomavi

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."

Share this post


Link to post
Share on other sites
FireFox

Nop. This is my translation. I can see french sentences in your example so I presumed you are french.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
bordomavi

Nop. This is my translation. I can see french sentences in your example so I presumed you are french.

ok. i am still waiting help

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
lionfaggot

winwait isnt always the best approach, ive had bugs with this function in the past. here is my personal solution:

Func WinLoad($win)
Do
 sleep(100)
Until WinExists($win, "")
EndFunc

Share this post


Link to post
Share on other sites
bordomavi

 

winwait isnt always the best approach, ive had bugs with this function in the past. here is my personal solution:

Func WinLoad($win)
Do
 sleep(100)
Until WinExists($win, "")
EndFunc

it is not answer for my question :S

Share this post


Link to post
Share on other sites
FireFox

@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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

it is not answer for my question :S

It's not a find the answer forum, a riddle or whatever  :mellow:

Edited by FireFox
  • Like 1

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
lionfaggot

@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

Share this post


Link to post
Share on other sites
AutID

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

Share this post


Link to post
Share on other sites
DW1

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

Share this post


Link to post
Share on other sites
FireFox

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

What's the difference with the other script you posted?

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  

×