Jump to content

Script stops


Recommended Posts

I didn't think that'd work. You tried using sleeps right? but between the Send, and WinWaitActive... try it with it before the send. It's possible that the window title is changing, but taking a while to load buttons... so then it's waiting for the next window (which is why looking at the debug in the tray would be good). Another thing you could try to do with use controls, and have it wait until a button with a certain text comes up, or something.

We ought not to misbehave, but we should look as though we could.

Link to comment
Share on other sites

OK.

I do it with Scite and F5.

I run the script (see attachment).

In the taskbar stands "smartfix.au3 Line16: WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Your picture shows that the 2nd last window but your mention of the taskbar (trayicondebug) is line16 which is the last window. Some how the code for the 2nd last window has already been processed. Jos mentioned this possibility in post #9.

Try using the text parameter to ensure the 2nd last window processes the correct window.

Example of change

Opt("TrayIconDebug", 1)
_WinWaitActive("smartFIX 4.1 Client - Willkommen")
Send("!w")
_WinWaitActive("smartFIX 4.1 Client - Client-Komponenten")
Send("!w")
_WinWaitActive("smartFIX 4.1 Client - Clienttyp")
Send("!v")
Send("!w")
_WinWaitActive("smartFIX 4.1 Client - smartFIX Server Name")
Send("W8KBDF14")
Send("!w")
_WinWaitActive("smartFIX 4.1 Client - Bereit")
Send("!i")
_WinWaitActive("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich')
Send("!f")
_WinWaitActive("smartFIX 4.1 Client Installerinformationen")
Send("!j")

Exit

Func _WinWaitActive($title, $text = "")
    ; wait for the window
    WinWait($title, $text)
    ; force the window to activate
    WinActivate($title, $text)
    ; wait for window to be active
    WinWaitActive($title, $text)
EndFunc

I believe i got the text right. You may want to check.

Now see if it stops at a similar window title that failed the script with previous attempts.

Link to comment
Share on other sites

OK.

If i run the script i see in the taskbar

smartfix.au3

Line23: WinWait($title, $text)

OK, that can mean any window title as the variables do not show their values for us to analyze the issue. But does it stop at the same window as before that you can see?

For the TrayIconDebug option to work then you may need to use your original script with the text parameter added like I did in my example script and see what TrayIconDebug show you when the script stops.

Edit:

This code may help. Does Activation of windows, has the extra text parameter and will show better line identification with TrayIconDebug.

Opt("TrayIconDebug", 1)

WinWait("smartFIX 4.1 Client - Willkommen")
WinActivate("smartFIX 4.1 Client - Willkommen")
WinWaitActive("smartFIX 4.1 Client - Willkommen")
Send("!w")

WinWait("smartFIX 4.1 Client - Client-Komponenten")
WinActivate("smartFIX 4.1 Client - Client-Komponenten")
WinWaitActive("smartFIX 4.1 Client - Client-Komponenten")
Send("!w")

WinWait("smartFIX 4.1 Client - Clienttyp")
WinActivate("smartFIX 4.1 Client - Clienttyp")
WinWaitActive("smartFIX 4.1 Client - Clienttyp")
Send("!v")
Send("!w")

WinWait("smartFIX 4.1 Client - smartFIX Server Name")
WinActivate("smartFIX 4.1 Client - smartFIX Server Name")
WinWaitActive("smartFIX 4.1 Client - smartFIX Server Name")
Send("W8KBDF14")
Send("!w")

WinWait("smartFIX 4.1 Client - Bereit")
WinActivate("smartFIX 4.1 Client - Bereit")
WinWaitActive("smartFIX 4.1 Client - Bereit")
Send("!i")

WinWait("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich')
WinActivate("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich')
WinWaitActive("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich')
Send("!f")

WinWait("smartFIX 4.1 Client Installerinformationen")
WinActivate("smartFIX 4.1 Client Installerinformationen")
WinWaitActive("smartFIX 4.1 Client Installerinformationen")
Send("!j")
Edited by MHz
Link to comment
Share on other sites

I have the solution :-)

I must create a loop.

This is the final script:

WinActivate ("smartFIX 4.1 Client - Willkommen")

Send("!w")

WinWaitActive("smartFIX 4.1 Client - Client-Komponenten")

Send("!w")

WinWaitActive("smartFIX 4.1 Client - Clienttyp")

Send("!v")

Send("!w")

WinWaitActive("smartFIX 4.1 Client - smartFIX Server Name")

Send("W8KBDF14")

Send("!w")

WinWaitActive("smartFIX 4.1 Client - Bereit")

Send("!i")

$h = 0

While $h <= 500

Send("!f")

$h = $h + 1

WEnd

WinWaitActive("smartFIX 4.1 Client Installer")

Send("!f")

WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Send("!j")

Thanks for your help.

Dennis

Link to comment
Share on other sites

I have a very easy script but it is not work :D

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

RunWait('alcohol.exe /s')

ControlClick('Installer Language','Please select a language','Button1')

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The first command is OK, but the second command is not work (no mistake in debug window). Help!!!

Sorry, I am Russian, my English is not very good:)

Link to comment
Share on other sites

  • Moderators

Vlademon,

Welcome the AutoIt forum. :huggles:

But this is not the way to start : - you should open a new topic for your question, not hijack this one. :D

Please do not reply here - just start a new topic in the forum and I am sure someone will help you there.

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

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