Jump to content

Recommended Posts

Posted

Hey,

I work for my high school's writing center and we use Google Forms to track our tutoring sessions. This was working really well until it turned out that there was more than one Google Form and that students were logging sessions in the incorrect Form. We now have about 200 sessions that are logged into the incorrect Form. 

I don't know much about programming, so I have a few questions.

I want to make a bot that copies over these sessions from one form to another. Is this a good language to learn to accomplish that task? 

One issue I have not been able to resolve is the drop down selection boxes. For example, to select a tutor, the user has to open a drop down and then either scroll down to the correct tutor, or start typing the tutor's name. Is it possible to make a bot highlight something and then say: if highlighted material says "Tommy Jones" type "Tommy Jones [Enter]"? 

Also, where can I learn more about this language? Is there a list of commands somewhere? I've learned a little from YouTube, but it's difficult to find videos related to what I need to do. 

Thanks in advance!

  • 1 year later...
Posted

I can't find any usable examples for interaction of elements in google forms via Autoit. @Nine's remark " I thing autoit can pretty much do anything..." is inspiring, but not really an answer. The "Autoit Window Info" cannot detect the fields inside the google form, so one cannot approach the field, read it or type into it.
Even off-topic advice, like using googlecl (which is a python tool, not Autoit), is currently not relevant as:

Quote

 8 June 2015: GoogleCL is currently broken due to the OAuth1 turndown, and likely to remain so. Thanks for your support over the years, and apologies for the lack of prior notice

if @nfe213 did find a way to solve her/his problem, please post it.

Posted (edited)

@Darklight

There is actually a solution that I am working on right now but can't promise I will post the result since I'm doing a thousand things and might not finish it. 

Here is a starting point and there are two problems using Autoit natively

1) You have to pick your browser passion. For simplicity I use IE user function  (not a problem for some)

2) I provided sample code for filling text field, drop downs and others require a little more work and that's what will take me time to do.

 

; List of _IE Functions: https://www.autoitscript.com/autoit3/docs/libfunctions/IE%20Management.htm

#include <IE.au3>
Opt('MustDeclareVars', 1)
Global $oIE, $sURL, $tForm, $FormElem


$sURL = "Enter the URL of your google form here"
$oIE = _IECreate($sURL)
$tForm = _IEFormGetObjByName($oIE, 'inspect the code and put the form name here') ; Form Name

$FormElem = _IEFormElementGetObjByName($tForm, 'emailAddress') ; Field Email assuming you want to use the generic email address
_IEFormElementSetValue($FormElem, 'myemail@example.com')

;Do the above 2 lines for each text field you want to enter. You will just have to view the page source code to find the correct fields to search for an fill in

 

That's almost using Autoit natively. Now if you're familiar with form 'posting' then you can create your own URL string as so :

https://docs.google.com/forms/yourformurl/viewform?field1name=field1value&field2name=field2value

In the above case field1name, field1value, field2name, field2value are replaced by what fields you want to fill in. It will be no problem to fill in a drop box or opening your own browser with the resultant form filled in (assuming you have your desired browser set as default)

 

Edited by NassauSky
Clarification

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...