Filling In a Web Page Form Using Automator
Вставка
- Опубліковано 16 жов 2024
- macmost.com/e-... You can use JavaScript in Automator to fill in a web page form. If you make this a Quick Action you can access it from the menu bar or as a keyboard shortcut. This can help speed up situations where you need to fill in the same form every day.
FOLLOW MACMOST FOR NEW TUTORIALS EVERY DAY
▶︎ UA-cam - macmost.com/j-y... (And hit the 🔔)
▶︎ Weekly Email Newsletter - macmost.com/ne... ✉️
▶︎ Twitter - / rosenz and / macmost 🐦
▶︎ Facebook - / macmost 👍
SUPPORT MACMOST AT PATREON
▶︎ macmost.com/pa... ❤️
#macmost #automator #jxa
Fantastic video. If my browser is chrome, what are equivalent commands ?
Great video!
How would you select a dropdown item?
first find the select element and then click. for example dropdown = document.getElementsByTagName("select"); dropdown[0].selectedIndex =5; // here 5th element of dropdown is clicked/selected.
Wow, I never knew you could do this! Awesome tutorial, thank you.
Always a thumbs up for your tutorials...
This is the best channel in apple world .
Thanks!
You are a STAR. I was looking for this s long time to run it from my ios via Shortcuts
@macmostvideo what if the element has no NAME or ID, like an href? I’m trying to take the example a step forward. There’s a dropdown list in navbar with an anchor tag. Thank you!
Very useful . Thanks ! ☺
I don't have the "Do Javascript" function. Any ideas? Thanks for this!
Safari does this already automatically when I am filling a form online... am I correct or do I need to do this?
Thoughts on the “Watch me do” function? None of my browsers work on the “Watch me do.”
Thanks, do you know how to open an URL within the javascript code? I've seen your solution (Get specified URLs and Display webpages), but as I'm trying to achieve a loop with multiple form submissions. Something like: after submission, pause, then open URL, fill out the form again, submit again, open URL. And the only way I can think of is to add some basic code (which I can't figure out!) to open the form URL inside the javascript code. Thank you
I've never tried that so I'm not sure. I don't know if it will work with something like that. Maybe Keyboard Maestro is more what you need.
This is the best thing ever! Thank you so much for the help!
Great explanation and tutorial! Thank you for saving me hours of future time...
Thanks, that helped me a lot. But I can't get it to work with radio buttons or checkboxes: any clues?
Found a solution
document.getElementsByName('NAME')[1].checked ='true';";
then change [1] to get any of the radio buttons in the form
Great video! How could you automate checking a specific box when filling out a form?
Not sure you can. Try looking at the properties of those elements to see if you check the value of that element, or the "checked" property.
Awesome tutorial thanks, is there a way to use a variable though in the field? So pass text through as input at the start then using variable input for example to enter this in one of the fields? I can't seem to figure out how to do this. :-/
You can prompt for input in Automator and then pass that into the script. Or, you can prompt for something using JavaScript. I don't know how much experience you have as a coder, so I can't say whether this will be easy for you, but keep researching Automator and JavaScript and you'll be able to figure it out.
Hi Gary, how about filling in blanks with NA? I just don’t know how to code the script. 😢
Not sure what you mean. The letters "NA"? Just type that.
@@macmost yeah, like in a questionnaire form, I’d like to fill in blanks with “NA” - not applicable. Wouldn’t it affect other items on that crm I am working on as I use the automator? Thanks!
@@yourtripdigs8239 "NA' is just text like anything else. You an use the same techniques to put "NA" into a field as you would any other text into another field.
@@macmostbut how do i write it when there are answered questions already, making sure they’re not changed, skip them and answer the remaining blanks with NA?
@@yourtripdigs8239 It will get more complicated. You'll need to expand the JavaScript code to check for a value first, then only put a new value in there if it is empty.
Very interesting!
Thank you. it's inspiring.
this movie,thank you.
im begenner studying javadcript.i feel pleasure.
i wanna know how you select from some options not input in javascript.
for example,jsScript += "document.??(i cant understand after this.)
Great to know, thanks!
Hi
Can you please suggest a way to make a GET request in script editor javascript and use the result as javascript variable.
Thanks
You are going to have to call a shell script to do that and use CURL inside that shell script. If app is the current app, then app.doShellScript() is what you need to use.. Google for examples.
Is this possible to do on facebook?
Probably not as Facebook uses complex page code for everything, not simple HTML forms.
@@macmost actually, using "record" tracks your movement and allows you to do it. Record, make a post, turn off record. Only working in safari, still tweaking. But it's working
hi, i wanna code a whole function Using Automator, not only line by line, how can I do this?
Not sure what you mean by "code a whole function" -- what are you trying to do, exactly?
@@macmost my bad, I am trying to search several hyperlinks of a webpage and click on the link the has the word I chose. I was able to do this using the console, but I can't find a way to do it the same way you did it with automator thanks
In your example, is it possible to insert a text string into the "Your Message" text box with numerous returns? Example) I want line 1 to say, "Lorem ipsum dolor", then line 2 to say "Donec pedi justo, fringilla vel, aliquot, nec".
I've searched & searched, but I'm not finding a workable solution to accomplish this using your tutorial
Try using \
for a return. That's TWO backslashes and an n.
@@macmost You, sir, are awesome! That worked! No lie, I probably spent a matter of 5-6 hours searching around the web and trying different things I found. I saw some posts mention using a similar solution, but it was only one backslash & obviously didn't work. It's hard to believe that I was so close, but I was one slash away from victory. I am forever grateful! Thank you!!!
absolutely lost on the transferring of the script from safari into automator,the correlation between them very vague.
I have copied the script from safari but have no clue what to do with it because im not using the website as you but trying to populate another web page
if you could add in how to automate from a selective drop down menu that would be perfect
script is as follows
Surname
by the way i watched this video 20 times over and i cant seem to get it to execute any function regardless of manipulating the code provided from macmost.com
no response yet,gosh...
guess not the quantity of subscribers allows you to be nonchalant about responding to potential subscribers based on interaction
This seems to open Chrome when I run the "Get Specified URLs" section
sounds like Chrome is set as your default browser then.
You can do this without automator as a bookmarklet. Bookmark this and change the IDs and inputs to your liking: javascript:%20{%20document.getElementById('singleLine0').value%20=%20'John';document.getElementById('singleLine1').value%20=%20'Smith';document.getElementById('btnSubmit').submit();}
you are teaching javascript man!!. but nice..
Great tutorial, but i was blocked immediately
Over my head.