Jump to content

Script stops


Recommended Posts

Hello,

i have a buit an autoit script, but it doesn't work well.

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

WinWaitActive("smartFIX 4.1 Client Installer")

Send("!f")

WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Send("!j")

The script stops here:

WinWaitActive("smartFIX 4.1 Client Installer")

Send("!f")

If i press ALT + i the script continues.

Where is the error?

Thanks

Dennis

Link to comment
Share on other sites

OK.

I try this:

Opt("WinTitleMatchMode", 3)

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

WinWaitActive("smartFIX 4.1 Client Installer")

Send("!f")

WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Send("!j")

But i have the same error :-(

Any ideas.......

Link to comment
Share on other sites

If its something simple, I certainly cannot see it.

You could try putting a sleep after the preceding send and a winactivate after that, if for some reason the window is not starting active.

Sorry I couldny help you.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • Developers

Put the opt() in there that the traydebuging is switched on but my wild guess would be that this is executed to early:

WinWaitActive("smartFIX 4.1 Client Installer")
Send("!f")

.. and that the script is waiting on the next line.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

@ John One.

Like That?

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

sleep (5000)

winactivate("smartFIX 4.1 Client Installer")

Send("!f")

WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Send("!j")

@Jos

Like this?

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

Opt("WinTitleMatchMode", 3)

WinWaitActive("smartFIX 4.1 Client Installer")

Send("!f")

WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Send("!j")

Both doesn't help :-(

Edited by SirHaschke
Link to comment
Share on other sites

@SirHaschke

Don't give up - Try putting Sleep(5000) between all your commands, and once it works

remove them 1 by 1

If that doesn't do it, you can repeat the process with MsgBox'es between your commands.

With this method you can almost always find the exact line where things go wrong.

HTH,

whim

Link to comment
Share on other sites

  • Developers

Step one: Add this at the top of your script and check by hovering over the tray ICON where your script is "hanging":

Opt("TrayIconDebug", 1)

Then start figuring out why.....

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

OK,

i do this:

Opt("TrayIconDebug", 1)

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

WinWaitActive("smartFIX 4.1 Client Installer")

Send("!f")

WinWaitActive("smartFIX 4.1 Client Installerinformationen")

Send("!j")

Do you mean the icon in the task bar?

If i put my mouse cursor over it i see only smartfix.exe.

Link to comment
Share on other sites

OK.

How can i run it not compiled?

If you have the script open in Scite, then you can press F5 button on your keyboard to run the script. Alternatively, you have the option to run the script from the right click of the au3 file if that option suits you. Again alternatively, if you have AutoIt3 from the extracted sfx archive, then you may run AutoIt3.exe and browse to the au3 file to run it. :D
Link to comment
Share on other sites

I run the script (see attachment).

I see an inactive window. perhaps that is the problem.

Try this code. The WinWaitActive() functions have an added underscore preceding them to call a user defined function to wait, activate and then wait for the window to be active which may help.

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")
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
Link to comment
Share on other sites

I see an inactive window. perhaps that is the problem.

You see an inactive window because he just pressed print screen, after opening the Run command. He had forced 'Run' to be the active window. Although I think that making sure you're activating the installation window would be a good idea, since install windows have a tendency to redraw the window, and can sometimes lose focus

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

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