Reputation: 113
This is my task which I am doing in AutoIT. Basic Info : I have a folder name "vk" and it has 5 subfolders named vk1 vk2 vk3 vk4 vk5. Each Subfolder has a file ,basically a keil project. Like
vk1 has first.uvproj
vk2 has sec.uvproj
vk3 has third.uvproj
and so on..
Now my requirement is to write a script where in the script has to go in vk1,vk2,vk3,vk4,vk5 folders and
open first.uvproj in notepad++
Do some operation
Close it
Next it has to open sec.uvproj
Do some operation
Close it
Next it has to open
third.uvproj
Do some operation
Close it and so on..
Till now I have done this for one file using paths hardcoded.
How to make it happen for all other folders.
Can any one help ?
Thanks
Upvotes: 0
Views: 335
Reputation: 26
The help file has your answer,
$sTextFile="first.uvproj"
Run ( "notepad.exe " & $sTextFile, @WindowsDir, @SW_MAXIMIZE )
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("[CLASS:Notepad]", "", 10)
WinClose("[CLASS:Notepad]")
$sTextFile="second.uvproj"
Run ( "notepad.exe " & $sTextFile, @WindowsDir, @SW_MAXIMIZE )
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
rinse and repeat
Upvotes: 1