← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #186633]: Array question

 

Question #186633 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/186633

    Status: Needs information => Open

Glenn Diaz gave more information on the question:
So kinda here's what I'm trying to attempt:

First, obviously, change over to putty then do the type command &
execute what is there.

switchApp("putty.exe")
type("sho 123456" + Key.ENTER)
type("sho 234567" + Key.ENTER)
type("sho 345678" + Key.ENTER)
type("sho 456789" + Key.ENTER)

This all works like a champ but what I'm trying to attempt is to take
and make it so that instead of having to handtype those id's (& those
are just samples for this here, I don't wanna put anything realistic in
there).  The id's are all of a fixed length so there is no problem
there.

What I'm hoping to accomplish is to maybe call a file like a .txt or xls
or ... whatever works.  Doesn't matter to me as long as I can get the
desired results.  There are several places I simply have no clue how to
write in there so I'll write it in plain text & hopefully someone can
either tell me how to do it myself or explain it to me.

switchApp("putty.exe")
(here's where I don't know) make a call to a .txt, xls ... whatever file & call in the id's from that file via, I would assume an array.

like I would say the text file would look like this & be called like
ids.txt

123456
234567
345678
456789

I'm looking to try to make these id's be read into the original so you
get like:

switchApp("putty.exe")
(input file ids.txt)
sho id1
sho id2
sho id3

and when it was done reading the #'s or even if there was a specified
say 20 or 50 id's or whatever the program would end.  The array would
loop through till it found nothing,

PLEASE ask me any questions you'd like.  I'm sure I'm missing pieces so
please by all means ask away.

Thanks

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.