Hey Folks,
I've finally got a working example.
Obviously the username and password are dummies, and I've commented-out the submit-button-click.
With the correct bonafides it successfully logs into the site.
I'm surprised there are not many examples on the net of doing this and related tasks with Smile.
Fortunately Emmanuel and François helped me enough to figure this out.
------------------------------------------------------------------------------------------- # Working Load Web Window with Log-In -------------------------------------------------------------------------------------------
set webWindow to make new web window with properties {path name:theurl, script:webWindowScript}
------------------------------------------------------------------------------------------- script webWindowScript on pageloaded webWindow
set webWindowUserName to "The-User-Name" set webWindowPassword to "The-Password"
set jsStr to " document.forms['loginform']['Username'].value = '" & webWindowUserName & "'; document.forms['loginform']['password'].value = '" & webWindowPassword & "'; // document.getElementById('#btnSubmit').click(); " callJavaScript webWindow script jsStr
end pageloaded end script -------------------------------------------------------------------------------------------
|