sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59497
Re: [Question #818719]: Ability to act on files in a folder one at a time
Question #818719 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/818719
JoeBloggs posted a new comment:
I think I've worked something out but not sure if this the best or most
efficient way but it does what I want. So is a start :-)
Once I've created the 'list' of files in the directory, then the script
pulls out the first entry in the list (as above) then need to convert it
to a 'string' I think by using the following.
joe = map(str, [files[0]])
this makes the variable joe easier to work with (less brackets and stuff)
Then open the file using the default application by substituting it into the App.open command and joining it, like this:-
app.open("C:\\test\\" + "".join(joe))
This then opens the first file using the default app !
Just thought I'd put it here in case anyone else can use it or if anyone
thinks I've done it wrong or over-complicated it and wants to tell me
why.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.