Jump to content

WinExists and a Google Form


Recommended Posts

Hey all,

I have a collegue that created a Google doc and form to track attendance. This form runs in IE and though running in kiosk mode, people could close the window with alt-f4. I wrote a very simple script to check and see if IE was running and if it was at the correct webpage. All good. Then my collegue activated the Google Form option for Edit Confirmation. With that setting activated, the 'attendance' program now verifies to the user that their input was accepted and added to the Google Doc spreadsheet via another web address- apparently generated by Google and not by my collegue. After activating the Edit Confirmation option, my simple 40 line script doesn't see the original address and starts another instance of IE and my collegues webpage. I figured 'no problem easy fix' becuase I could simply look for WinExists("original page") or WinExists("Edit Confirmation Page") and be done with it. However, WinExists is not seeing the "Edit Confirmation Page" in kiosk mode. It works fine with a standard IE instance. Note that I have used both the Title and Class options with out success along with the WinActive function. I was able to get ProcessExists() to return 'true' but I figure that is simple identifying IE and not the properties of the page generated by the Edit Confirmation option.

I may have to make my code a little more complicated to cope but I was posting to see if anyone else has had the problem and to give a 'heads up' to anyone here getting ready to work with Google Docs.

Thanks

while $Running = 0 or $Running = 1

$Running = WinExists("CHS Library Media Center Attendance","") or WinExists("Thanks!","")

;msgbox(0,"Test",$Running)

if $Running = 0 Then

run("C:\Program Files\Internet Explorer\iexplore.exe -k https://spreadsheets.google.com/viewform?formkey=")

;msgbox(0,"Test","While")

WinWait("Library Media Center Attendance","",10)

$Running = WinExists("Library Media Center Attendance - Windows Internet Explorer","")

If $Running = 0 Then

MsgBox(0,"Time Out Error","Waited 60 seconds for the Library Media Center Attendance screen.")

EndIf

EndIf

$Running = WinExists("Library Media Center Attendance","")or WinExists("","Thanks!")

;msgbox(0,"Test last $Running",$Running)

WEnd

Link to comment
Share on other sites

Discovery164,

Welcome to AutoIT Forums! Go luck with your AutoIT programming which is a very useful and helpful time saver. Great job on figuring out what your problem was.

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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