Jump to content

Recommended Posts

Posted (edited)

I have code for kill windows/pop up but not working

My code is :

$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

Winkill ("PS", $abc) or ("PS", $pqr)

Also tried with :

$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

Winkill ("PS", $abc)
Winkill ("PS", $pqr)

My full code is :
 

$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

; Some Code is here
Winwait ("PS", $abc) or Winwait ("PS", $pqr)
Winkill ("PS", $abc) or Winkill ("PS", $pqr)
; Some Code is here

But not working

Edited by Nareshm
Posted
If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Posted
$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

Winkill("PS", $abc) AND Or Winkill("PS", $pqr)

might work better, or

$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

Winkill("PS", $abc)
Winkill("PS", $pqr)

 

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Posted

are you running your script in the SciTE editor? it should tell you where a problem in a script is.

when i tried to run your script in SciTE it gave errors directly in script...

$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

Winkill ("PS", $abc) or ("PS", $pqr)
  error: unbalanced paranthesis expression.
  error: syntax error
  error: Statement cannot be just an expression.

it also shows where the halt is in the console readout at bottom of editor, indicated by the "^" below the line of code...

"C:\Users\alienclone\New AutoIt v3 Script.au3"(8,30) : error: unbalanced paranthesis expression.
Winkill ("PS", $abc) or ("PS",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\alienclone\New AutoIt v3 Script.au3"(8,30) : error: syntax error
Winkill ("PS", $abc) or ("PS",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\alienclone\New AutoIt v3 Script.au3"(8,32) : error: Statement cannot be just an expression.
Winkill ("PS", $abc) or ("PS", $pqr
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\alienclone\New AutoIt v3 Script.au3"(8,37) : error: Statement cannot be just an expression.
Winkill ("PS", $abc) or ("PS", $pqr)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\alienclone\New AutoIt v3 Script.au3 - 4 error(s), 0 warning(s)

 

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

  • Developers
Posted (edited)
4 minutes ago, alienclone said:

are you running your script in the SciTE editor? it should tell you where a problem in a script is.

Only when the Full version of SciTE4AutoIt3 is separately installed!

Jos

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

Posted

oh shoot, i forgot that i had the full separate version installed.

@Nareshm  i would suggest following the link in @Jos's signature and install the full editor.

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Posted

perfect, the message box tells the error, "one statement per line". so we would put each command on separate lines...

$abc = ("Done:2: See logs for more details.")
$pqr = ("Msg:2.2: (Save) :-  Server was unable to process request.")

Winkill("PS", $abc)
Winkill("PS", $pqr)

if either one or both of those windows exist this should kill them.

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

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
×
×
  • Create New...