Nareshm

Winkill/Winwait Not Working

10 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#2 ·  Posted


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

>Exit code: 0

REAL search results

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

Share this post


Link to post
Share on other sites

#4 ·  Posted

winkill("title", "text") or winkill("title", "text")

 


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

>Exit code: 0

REAL search results

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

Share this post


Link to post
Share on other sites

#5 ·  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

>Exit code: 0

REAL search results

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

Share this post


Link to post
Share on other sites

#6 ·  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

>Exit code: 0

REAL search results

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

Share this post


Link to post
Share on other sites

#7 ·  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

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

#8 ·  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

>Exit code: 0

REAL search results

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

Share this post


Link to post
Share on other sites

#10 ·  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

>Exit code: 0

REAL search results

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

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