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

КОМЕНТАРІ • 58

  • @agrviv
    @agrviv 2 роки тому +4

    Fantastic video. If my browser is chrome, what are equivalent commands ?

  • @janspalti7980
    @janspalti7980 2 роки тому +6

    Great video!
    How would you select a dropdown item?

    • @simpleappdesigner1362
      @simpleappdesigner1362 Рік тому

      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.

  • @davehugstrees
    @davehugstrees 4 роки тому +1

    Wow, I never knew you could do this! Awesome tutorial, thank you.

  • @rolandgerard6064
    @rolandgerard6064 4 роки тому +2

    Always a thumbs up for your tutorials...

  • @kiransankarpati
    @kiransankarpati 2 роки тому

    This is the best channel in apple world .

  • @aledro32
    @aledro32 2 роки тому

    You are a STAR. I was looking for this s long time to run it from my ios via Shortcuts

  • @idrisabdulwahab8378
    @idrisabdulwahab8378 2 роки тому +1

    @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!

  • @alej2008
    @alej2008 6 місяців тому

    Very useful . Thanks ! ☺

  • @mrkochvideos
    @mrkochvideos 2 роки тому

    I don't have the "Do Javascript" function. Any ideas? Thanks for this!

  • @Assassin1959
    @Assassin1959 4 роки тому +1

    Safari does this already automatically when I am filling a form online... am I correct or do I need to do this?

  • @thatsmallcloud
    @thatsmallcloud 3 роки тому

    Thoughts on the “Watch me do” function? None of my browsers work on the “Watch me do.”

  • @w8ing4uuu
    @w8ing4uuu 6 місяців тому

    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

    • @macmost
      @macmost  6 місяців тому +1

      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.

  • @musicmanalex1
    @musicmanalex1 4 роки тому

    This is the best thing ever! Thank you so much for the help!

  • @herbkuryliw6598
    @herbkuryliw6598 3 роки тому

    Great explanation and tutorial! Thank you for saving me hours of future time...

  • @w8ing4uuu
    @w8ing4uuu 3 роки тому +1

    Thanks, that helped me a lot. But I can't get it to work with radio buttons or checkboxes: any clues?

    • @w8ing4uuu
      @w8ing4uuu 3 роки тому +1

      Found a solution
      document.getElementsByName('NAME')[1].checked ='true';";
      then change [1] to get any of the radio buttons in the form

  • @davidnoah11
    @davidnoah11 4 роки тому +1

    Great video! How could you automate checking a specific box when filling out a form?

    • @macmost
      @macmost  4 роки тому +1

      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.

  • @MattLovett
    @MattLovett 4 роки тому

    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. :-/

    • @macmost
      @macmost  4 роки тому

      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.

  • @yourtripdigs8239
    @yourtripdigs8239 Рік тому

    Hi Gary, how about filling in blanks with NA? I just don’t know how to code the script. 😢

    • @macmost
      @macmost  Рік тому

      Not sure what you mean. The letters "NA"? Just type that.

    • @yourtripdigs8239
      @yourtripdigs8239 Рік тому

      @@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!

    • @macmost
      @macmost  Рік тому +1

      @@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.

    • @yourtripdigs8239
      @yourtripdigs8239 Рік тому

      @@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?

    • @macmost
      @macmost  Рік тому

      @@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.

  • @Alex.teimoori
    @Alex.teimoori 2 роки тому

    Very interesting!

  • @ilovewengyful
    @ilovewengyful 3 роки тому

    Thank you. it's inspiring.

  • @mochimochichichi
    @mochimochichichi 3 роки тому

    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.)

  • @joelcooper2507
    @joelcooper2507 3 роки тому

    Great to know, thanks!

  • @ankursingla263
    @ankursingla263 3 роки тому

    Hi
    Can you please suggest a way to make a GET request in script editor javascript and use the result as javascript variable.
    Thanks

    • @macmost
      @macmost  3 роки тому

      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.

  • @TheNoiseFloorav
    @TheNoiseFloorav 4 роки тому

    Is this possible to do on facebook?

    • @macmost
      @macmost  4 роки тому +1

      Probably not as Facebook uses complex page code for everything, not simple HTML forms.

    • @TheNoiseFloorav
      @TheNoiseFloorav 4 роки тому

      @@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

  • @rodrigolopes441
    @rodrigolopes441 4 роки тому

    hi, i wanna code a whole function Using Automator, not only line by line, how can I do this?

    • @macmost
      @macmost  4 роки тому +1

      Not sure what you mean by "code a whole function" -- what are you trying to do, exactly?

    • @rodrigolopes441
      @rodrigolopes441 4 роки тому

      @@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

  • @DrewPridemore
    @DrewPridemore 2 роки тому

    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

    • @macmost
      @macmost  2 роки тому

      Try using \
      for a return. That's TWO backslashes and an n.

    • @DrewPridemore
      @DrewPridemore 2 роки тому

      @@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!!!

  • @jerichojames4769
    @jerichojames4769 3 роки тому

    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

    • @jerichojames4769
      @jerichojames4769 3 роки тому

      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

    • @jerichojames4769
      @jerichojames4769 3 роки тому

      no response yet,gosh...

    • @jerichojames4769
      @jerichojames4769 3 роки тому

      guess not the quantity of subscribers allows you to be nonchalant about responding to potential subscribers based on interaction

  • @AlainSTO
    @AlainSTO 4 роки тому

    This seems to open Chrome when I run the "Get Specified URLs" section

    • @macmost
      @macmost  4 роки тому

      sounds like Chrome is set as your default browser then.

  • @JohnathanNoechelShunn
    @JohnathanNoechelShunn 4 роки тому +1

    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();}

  • @prashantmaitra3361
    @prashantmaitra3361 4 роки тому

    you are teaching javascript man!!. but nice..

  • @gromgromgrom3043
    @gromgromgrom3043 7 місяців тому

    Great tutorial, but i was blocked immediately

  • @SoNowWhat
    @SoNowWhat 4 роки тому

    Over my head.