Sign in to follow this  
Followers 0
SirHaschke

Script stops

27 posts in this topic

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

Share this post


Link to post
Share on other sites



I don't think so. In the attachment is the picture........

I think it's only a little stupid error.

post-55942-12656404274726_thumb.jpg

Share this post


Link to post
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.......

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

If i press ALT + F the script continues and runs normaly with the next Send("!j") command.

Edited by SirHaschke

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

@ 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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

the TrayIconDebug option doesn't work for compiled scripts. Try just running it not compiled, and you can see the progress.


RAWR! I'm hungry :( Feed the panda squirrle

Share this post


Link to post
Share on other sites

OK.

How can i run it not compiled?

Share this post


Link to post
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

Share this post


Link to post
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")

post-55942-12657988236875_thumb.jpg

Share this post


Link to post
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

Share this post


Link to post
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


RAWR! I'm hungry :( Feed the panda squirrle

Share this post


Link to post
Share on other sites

OK.

I try the script from MHZ.

Negative. It doesn't work.

Same error :-(

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  
Followers 0