Jump to content

Displaying/Passing Returns


Recommended Posts

How Do I display/obtain a return value from WinWaitClose?

Specifically:

The last function does not execute and I would like to get an error to be displayed via MsgBox().

How do I do this?

#include<.\Include\jClassOpenProgram.au3>
$firstProgram = "Total Service Manager  F:\TSM60\DATA\"
$secondProgram = "Adobe Acrobat Professional - [" & $fileName & "]"
closeProgram($firstProgram)
WinWaitClose("Total Service Manager  F:\TSM60\DATA\",2)
closeProgram($secondProgram)
WinWaitClose("Adobe Acrobat Professional - [" & $fileName & "]")
msgbox(64,"Finished Automation","The automated process is complete. You may now safely use your keyboard and mouse.",10)
Edited by JohnBailey
A decision is a powerful thing
Link to comment
Share on other sites

Well, to quote the helpfile:

Therefore, this SHOULD work:

If NOT WinWaitClose("whatever") = 1 Then Msgbox(0,"","WinWaitClose FAILED")oÝ÷ Ø««·ú®¢×º»p£!iÙè×!Ê.Ü+×¢¶ØZ¶È¦¦·Üéު笶*'v¬¶­æ§Ü(ºW[zX¤y«­¢+Ù]¥¹]¥Ñ
±½Í ÅÕ½ÐíÝ¡ÑÙÉAɽɴÅÕ½Ðì°È¤)%9=P]¥¹]¥Ñ
±½Í ÅÕ½ÐíÝ¡ÑÙÉAɽɴÅÕ½Ðì¤ôÄQ¡¸5ͽà À°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí]¥¹]¥Ñ
±½Í%1ÅÕ½Ðì
A decision is a powerful thing
Link to comment
Share on other sites

  • Developers

Well, to quote the helpfile:

Therefore, this SHOULD work:

If NOT WinWaitClose("whatever") = 1 Then Msgbox(0,"","WinWaitClose FAILED")oÝ÷ Ø««·ú®¢×¥v}ý¶ØZµ·ºÚ"µÍYÕ
Ú[ØZ]ÛÜÙJ  ][ÝÝÚ]]][ÝÊHHJH[ÙØÞ
    ][ÝÉ][ÝË    ][ÝÕÚ[ØZ]ÛÜÙHRSQ ][ÝÊoÝ÷ ÚãºËZºÚ"µÍYÕÚ[ØZ]ÛÜÙJ ][ÝÝÚ]]][ÝÊH[ÙØÞ
    ][ÝÉ][ÝË    ][ÝÕÚ[ØZ]ÛÜÙHRSQ ][ÝÊ

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

  • Developers

Kurt wow I had no idea I could write it that simply! One question does that mean it would be like

WinWaitClose("whateverProgram",2)
If NOT WinWaitClose("whateverProgram") = 1 Then Msgbox(0,"","WinWaitClose FAILED")

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

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