automate actions in safari

i hope this message is in the right place,

i have been trying to figure out a way to automate 3 steps in safari. i have a record label and we use myspace, every day we have upwards of 1000 friend requests, and they dont provide one button to approve all. so i have to approve 10 at a time. i need to check a box, click a submit and click ok on a javascript confirm. is there a way to automate this. any direction would be much appreciated.

thanks in advance


i have attached images showing the steps the select all checkbox, and the approve selected submit the javascript confirm

Browser: Safari 312.5
Operating System: Mac OS X (10.3.9)

You can do this using Applescript w/ JavaScript command. I need to see the actual html to give you the exact code but you could use this to get started (you will need to change the code to match your form)

tell application "Safari" to do JavaScript ("document.forms['frmData'].elements['YourVariableGoesHere'].checked = 'True';") in document 1

tell application "Safari" to do JavaScript ("SubmitPage('YourVariableGoesHere');") in document 1

thanks a ton, i will give it a try and come back with plenty of questions im sure


here is the select all

Select/Deselect All

here is the submit

i cant figure out how to work that one since is not a named input