I want save and close file,because the time is different for save,I failed.
My script is:
sendinput,^s
sleep,500
send,!{space}c
sleep,500
return
Please give directions,thanks!
Save and Close File
- divanebaba
- Posts: 805
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: Save and Close File
Hi.
Years ago, I had a similar problem. I solved it more dirty than quick, by checking with FileExist()
For example:As I don't know, which program you use, I can not give more reliable support.
Maybe when you are working with MS Word, there are strongly reliable COM-functions you should not neglect.
Sometimes you can even use WinMenuSelectItem to select commands from the used program.
Without more information, this is everything I can do for you.
As engineers say: Less in, less out.
Give me more input, and more output could be possible.
Years ago, I had a similar problem. I solved it more dirty than quick, by checking with FileExist()
For example:
Code: Select all
myFile := "c:\Data\myTextFile.txt"
sendinput,^s
sleep,500
loop 10
{
if !FileExist(myFile)
sleep 300
else
break
}
if !FileExist(myFile)
{
Msgbox Error. File could mot be saved.
return
}
send,!{space}c
sleep,500
return
Maybe when you are working with MS Word, there are strongly reliable COM-functions you should not neglect.
Sometimes you can even use WinMenuSelectItem to select commands from the used program.
Without more information, this is everything I can do for you.
As engineers say: Less in, less out.
Give me more input, and more output could be possible.
Einfach nur ein toller Typ.
Re: Save and Close File
Thanks!