as you may tell from my limited number of posts (this is the first one… :)) I am fairly new to AppleScripting but already hooked…
I would like to automate some online banking I now perform manually.
As far as I can see by browsing it’s AppleScript library, Firefox has very limited scripting capabilities, still they might be sufficient…
tell application "Firefox"
will start Firefox and get the URL of the Applescript forum in MacScripter.
Now, suppose I want to login to a service (my bank account), how can that be done?
May be it’s better to refrase and ask “If” there is a way to do that?
And where can I go from here?
And would it be possible to script a transaction?
If not with Firefox, could this be done with Safari?
Your help on the subject would be much appreciated
Thanks regulus, for the prompt reply but…
Whow! that looks far to difficult for my limited skills.
It seems to me like I have to become first a professional programmer, in order to do what I wish.
I am sure there must be an easier way…
Perhaps somebody could come up with some, simple, practical exemples on how to login to a site Using Firefox and AppleScript and, after that, send some info?
The GUI scripting stuff in my experience can be more tricky then normal scripting in some cases.
So my advice would be to just search this forum like crazy and be prepared to get stressed out alot.
I don’t have firefox but try something like this to start you off!:
tell application "Safari"
open location "https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl<mpl=cm_googlemail<mplcache=2"
tell application "System Events"
tell process "Safari"
set frontmost to true
-- keystroke return --(if you uncomment this it will click the sign in button) not getting you anywhere unless you have an account with this username & password though!!
I have checked out your advise but there is something that I do not understand.
If I use it the way it is, I get correctly prompted for the Google Login page with the UserID and password blocks already filled in.
It only needs a return to continue but if I try changing the “username” and “password” strings with my own, sometimes it ends in filling the URL box and search box with them.
I have tried increasing the delay and that seems to fix the problem, so does running the script twice.
I think the script just needs to be made a bit more robust as apparently, the script doesn’t know really where to place the text hence, if page loading is not completed, it will place the text in the first available boxes.
But at least I am moving now.
GUI scripting is a blunt instrument and should be treated that way in most cases!
What works on one machine won’t always work on another due to various factors (cpu! , internet connection etc…)
Like i said prepare to get stressed!!
Hi there mcgrailm, I am glad to see this forum section is quite active…
To be honest though, there isn’t much more so far.
As I mentioned before, all I want to do basically, is loggin into my online banking service by filling in a browser form and sending the requested information automatically.
I have tried pidges1 AppleScript which seems to be going into the right direction but probably needs some refinement.
For instance, is it possible to automatically check if the page is fully loaded?
Would there be something that can position the cursor precisely into the needed field for filling in a form?
Moreover, could you please explain the difference, if any, between openURL I used with Firefox and open location pidges1 used with his script?
I think the difference is just the difference between the two application dictionarys (how you talk to the app)
So, I’d go for Safari (or others).
thank you to everybody for the rather incouraging information received so far.
I understand among other things that I have to further dig into matters related to AppleScripting prior to come back here with some more specific questions.
I certainly will as wonderfull tasks can be mastered with AppleScript, but that will need some time spent reading the information already available in the forum.