This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I am not able to save notepad file.

Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objTFile=objFSO.CreateTextFile("C:\test\Test.txt")          
SystemUtil.Run "C:\test\Test.txt"       
Window("Notepad").Activate
Window("Notepad").Type micCtrlDwn   "v"   micCtrlUp
wait 3Window("Notepad").Type micCtrlDwn   "s"   micCtrlUp
systemUtil.CloseProcessByName "C:\test\Test.txt"
Set objfileToread=objFSO.OpenTextFile("C:\test\Test.txt",1)fileText=objfileToread.ReadAll()

.................................................................................................
I am getting an error that this process is accessed by another service at "Window("Notepad").Type micCtrlDwn "s" micCtrlUp" step. But when I run the following code it gets executed successfully.

................................................................................................

Set objFSO=CreateObject("Scripting.FileSystemObject")SystemUtil.Run "C:\test\Test.txt"       
Window("Notepad").Activate
Window("Notepad").Type micCtrlDwn   "v"   micCtrlUp
wait 3Window("Notepad").Type micCtrlDwn   "s"   micCtrlUp
systemUtil.CloseProcessByName "C:\test\Test.txt"
Set objfileToread=objFSO.OpenTextFile("C:\test\Test.txt",1)fileText=objfileToread.ReadAll()

 

Parents
  • 0

    In the wake of changing the Notepad document in Windows 10, click Save, however the Save As discourse put away is popped. The working framework under Windows 10 recoveries it straightforwardly. For what reason does Windows 10 spring up a Save As discourse box? This isn't unnecessary. Nonetheless, while saving another Notepad record in Windows 10, the Save As discourse box isn't sprung up and it was saved straightforwardly. What is happening?

    Incidentally, Windows 10 class result has additionally fortified the power the board. There is no adjustment expert for the past Notepad record as a matter of course. If you would rather not save as, allot the ongoing client adjustment position to it that should be changed and the Save As discourse box won't be sprung up.

Reply
  • 0

    In the wake of changing the Notepad document in Windows 10, click Save, however the Save As discourse put away is popped. The working framework under Windows 10 recoveries it straightforwardly. For what reason does Windows 10 spring up a Save As discourse box? This isn't unnecessary. Nonetheless, while saving another Notepad record in Windows 10, the Save As discourse box isn't sprung up and it was saved straightforwardly. What is happening?

    Incidentally, Windows 10 class result has additionally fortified the power the board. There is no adjustment expert for the past Notepad record as a matter of course. If you would rather not save as, allot the ongoing client adjustment position to it that should be changed and the Save As discourse box won't be sprung up.

Children
No Data