Re: [Sikuli-driver] [Question #228659]: need help with this software, newbie...

2013-05-29 Thread Mark Weisler
Question #228659 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/228659

Mark Weisler posted a new comment:
Below is some code that might help with this question...


# script: URLWatcher
# cycles through some URLs which are initially loaded into a list
# 22 Mai 2013, Mark Wißler
# written for OS X; could be adapted to other OSs.
# preconditions: a) existence of the URL file, b) Safari is running

import sys, string, os  # some libraries we are likely to need

aURL=[] #defining an empty list

URLfile = open('/Users/joe/Documents/URLs.txt', 'r') # file containing our URLs 
of interest
for line in URLfile:  # just to demonstrate the existence of the file and 
entries
print line,
aURL.append(line) # add each line as item in our list
   
URLfile.close()

print aURL # demonstrates the list still exists and contains items
myLimit = len(aURL)
print myLimit
print aURL[0]
print aURL[1]
print aURL[2]

### now moving on to the Web browser...
App(Safari).focus() # bring Safari browser into focus

i = 0  # index for our loop
mycontinue = True
while mycontinue:

type(l, KEY_CMD) # Safari key to open location (or reading list?)
type(Key.DELETE) # deletes any string in the URL field


type(aURL[i]+ Key.ENTER) # then the Web page appears
# we could do some other work here like examine the page
i +=1 # increment index to prepare for next URL to see
if i =myLimit:
i = 0
wait(5)
# result is that this  brings up a web page
# next you would likely evaluate the web page, process it, scrape it, save 
it, u.s.w.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #228659]: need help with this software, newbie...

2013-05-13 Thread RaiMan
Question #228659 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/228659

Status: Open = Answered

RaiMan proposed the following answer:
Yes, this is possible with Sikuli.

But since it is some web application, Selenium might be suitable too.
Depends on the goals and status of programming/scripting knowledge.

For Sikuli it is helpful, to just have a quick walk through the docs::
http://doc.sikuli.org

Then you will find many answers and examples in this board and some
hints in the faqs.

Additionally Google always is your friend.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp