Sign in to follow this  
Followers 0
Zigloo

Batch mode don't work ?

5 posts in this topic

Hi all :"> ,

My problem is very simple !

Let's see the following script :

Run("notepad.exe")

Dim $Title = "Sans titre - Bloc-notes"

WinWait($Title)

WinActivate($Title)

Send("!FQ")

When I execute it on screen, it works fine : it opens notepad (in french version :P ) and then close it ! Nothing's difficult at all, no ?

When I create a scheduled task associated with the user I am logged on, and execute it, it does the same thing... And I can see Notepad opening and then closing ! We can see that it works fine... but that's not a real batch mode !

But when I execute the same scheduled task associated with another user (which is also administrator of the computer), I see nothing (that's nice), the scheduled task starts and finishes but notepad stay open ! I see it with the Task Manager, I can kill it with a tool (Kill.exe) but I think that the Send function has never sent the two keys (Alt-F and Q) to my notepad window ! How sending those keys in that batch mode !!!

That's it... Thanks in advance for your many responses... I'm happy because I'm going to learn something ;) !

Bye

Share this post


Link to post
Share on other sites



;) !

Excuse-me but if my problem was "How can I close a window ?", I just have to do :

WinClose($Title)

The problem is : How can I send keys to a window in batch mode ?

Your answer Valuater was not the good answer ! Is there another player ? :P

Share this post


Link to post
Share on other sites

;) !

Excuse-me but if my problem was "How can I close a window ?", I just have to do :

The problem is : How can I send keys to a window in batch mode ?

Your answer Valuater was not the good answer ! Is there another player ? :P

You could try using ControlSend you can read about it in the help files.

BTW

This is not a support forum (see top of page)



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Well, BigDod, thank's for your answer, but I've tried too this function and it doesn't work better... It's the same problem... Notepad stay open and I can read yhe documentation and yhe help files many times, it stay opened !!!

I know this is not a support forum nor an helpdesk ! I think it's a community of users ! If my purposes have blessed you, excuse me ! But how can I do with my problem ! Nobody can answer me, nobody use AutoIt to do batch works ! I can beleave that !!! So, what ???

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Um, I'm not sure what you mean by the term 'batch mode' in the context of making an AutoIT script (English is my first language). Is your program actually allowed to run from scheduler?

Somebody was discussing what appears to be exactly this same problem elsewhere in the last day or two, and I recollect it had to do with the Windows scheduler and security/logons, rather than anything with AutoIT. It may pay to do a forum search on scheduler and see what comes up.

PS: You posted your question in the wrong part of the forums - that is why BigDod mentioned it.

Send("!FQ")

You're kidding me aren't you? Edited by Confuzzled

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