Jump to content
Sign in to follow this  
Spacial

! Pling not recognised XP

Recommended Posts

Spacial

New member. Apologies if this has been posted previously.

I intend to use this tool with XP and W7. Not tried it with W7 yet.

Working through the tutorial, in the second example, I cut and pasted the script into the empty script. It opens Notepad, prints the test, tries to close it, but doesn't accept Send("!n") instead, it hangs at the Yes No dialog.

I tried altering the command to N, y and Y, but to no effect. I also tried, on my keyboard, pressing the Alt + n and it worked.

Any ideas why Send("!n") doesn't work in XP?

Share this post


Link to post
Share on other sites
water

Welcome to AutoIt and the forum!

You are talking about this script?

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Save")
;WinWaitActive("Notepad", "Do you want to save") ; When running under Windows XP
Send("!n")

Did you make the changes for XP as mentioned in the comment?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Spacial

Welcome to AutoIt and the forum!

You are talking about this script?

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Save")
;WinWaitActive("Notepad", "Do you want to save") ; When running under Windows XP
Send("!n")

Did you make the changes for XP as mentioned in the comment?

No, I pasted it in exactly as it said. I did notice that comment but couldn't see any indication of what it was for.

Share this post


Link to post
Share on other sites
water

I think (can't test any longer) your script should look like:

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Do you want to save") 
Send("!n")

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Spacial

 

I think (can't test any longer) your script should look like:

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Do you want to save") 
Send("!n")

Not sure why as you don't explain. But I have tried altering it and still the same.

I've run the program, AutoIt Window Info. It opens as (Frozen). I've found by removing the tick I can unfreeze it. It certainly responds.

Below is an image of the text on those tabs in AutoIt Windows Info which have any.

Hope this might help. Appreciate any advice

sv2hlc.jpg

Share this post


Link to post
Share on other sites
MikahS

@Spacial I tested water's code on both XP and win 7 and it worked like a charm.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
water

This example runs fine on WIndows 7 and is language independant (I'm running a german system):

Run("notepad.exe")
WinWaitActive("[Class:Notepad]")
Send("This is some text.")
WinClose("[Class:Notepad]")
WinWaitActive("[Class:#32770]")
Send("!n")

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
MikahS

Again, works like a charm with both @water :)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
Spacial

Thanks everyone.

I've just run it on my W7 machine and it does indeed work well.

But it doesn't in XP, which is a shame really.

Share this post


Link to post
Share on other sites
water

So the Art of Debugging would be the next thing to learn :)

Run("notepad.exe") 
ConsoleWrite("1" & @CRLF)
WinWaitActive("[Class:Notepad]")
ConsoleWrite("2" & @CRLF)
Send("This is some text.")
ConsoleWrite("3" & @CRLF)
WinClose("[Class:Notepad]")
ConsoleWrite("4" & @CRLF)
WinWaitActive("[Class:#32770]")
ConsoleWrite("5" & @CRLF)
Send("!n")
ConsoleWrite("6" & @CRLF)

Run this on Windos XP from Scite and check which numbers can be seen in the SciTE output pane.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
MikahS

@spacial The only thing shameful is if you do not debug it :)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
Spacial

I would be more than pleased to debug it if I had a clue where to start.

I've just started using this program, yet crashed on the second tutorial. There must be an answer, that much is obvious. But without some indication of where to look, I don't really see how I can find it.

It works on the W7 machine so that's a start. I use XP much more than W7 though. Still, perhaps the answer is another maco compiler.

Thank you anyway, for your time.

Share this post


Link to post
Share on other sites
jchd

Do you ever read answers?


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
Spacial

Do you ever read answers?

I do my best, when I know what it is I'm reading.

I made the assumption that a tutorial, explaining the basics to someone, new to the routine, would avoid obfuscation at the start. I've previously learn other computer languages, in the 1980s, FORTH, BASIC and some assembly.

Assuming I was missing something I came here, hoping to be pointed in the right direction.

I will choose to rise above your attempted condescension. I'm sure most people here don't share your subliminal ambition to emulate your secondary school maths teacher. o:)

Share this post


Link to post
Share on other sites
water

As most of the users on this forum have already moved to Windows 7 or later it isn't easy to help you. We just can give you some advice or example code. But you have to try it yourself.

So please give post #11 a try.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Spacial

I understand and thank you for your efforts.

As I said, I have both, but prefer to use XP because it is faster and more secure. I chose AutoIt because it did say it is compatable with all.

I realise now, that the coding is different between XP and W7.  This sadly was not made clear. I was hoping to have some indication of what those difference are.

But I am grateful for your efforts none the same.

The code in #11, I found this morning. It is 9.55 am here, though I think most of you are on the other side of the pond, where among other things, you have funny time. :bye:

Share this post


Link to post
Share on other sites
water

It's 11:05 am here, so I'm on the same side of the pond.

Did you try the code in #11?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Spacial

Yes I did. It seems to do exactly what the original code was supposed to.

Share this post


Link to post
Share on other sites
water

So the problem is solved?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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  

×