Hello !
The only way I’ve found to fill text fields in Safari is using GUI Scripting and command “keystroke” like that :
keystroke (ASCII character 9)
delay 0.2
keystroke (ASCII character 9)
delay 0.2
keystroke "texte de test"
. And I would prefer using this kind of script :
set value of text field 1 of window 1 to "texte de test"
. But, when I’m using the second kind of script, fields are filled but Safari refuses to validate the infos
Is it normal ? What am I doing wrong ?
Thanks in advance
Hi. Really nobody to help me
Nobody wants to help you because this is a RTFM moment… You can’t interact with the internet via Applescripting in the sense your asking for. Your options are System Events scripting, Extra Suites scripting, Do Javascript (In Safari) or a combination of the three. Javascript would obviously be the best choice, but unless you know it, it’s not doing you a lot of good. For the time being, I would stick with System Events and just use “keystroke tab” and “keystroke return” a lot. If need be, Extra Suites works for clicking the mouse, but it’s even worse than System Events as far as GUI scripting goes. Nothing can move around or Extra Suites falls apart.
Thanks for your reply Sk8.4.Life.
Even if it’s a “RTFM moment”. I really didn’t find any info on that anywhere, that’s why I posted a question.
Hey yeah… about that. I was at work all day or I would’ve said something sooner, but I think RTFM is a little harsh. >.< If anything, it was a STFW ;). But seriously, I’m sure if you just hit up the search function here on macscripter.net, you would’ve gotten answers.