hello there
I am trying to enter gmail mailbox , I have done it succesfully on windows XP on the machine in my workplace, but encountered problems when I tried to run it on VISTA on my home PC.
I tried some ways, I took the script as is from tanks suggestion at http://www.autohotke... ... b document
for making things easier let's say i am trying this one:
sUrl := "http://www.gmail.com"
Name := "UserName"
PW := "Password"
COM_Init()
pweb := COM_CreateObject("InternetExplorer.Application")
COM_Invoke(pweb, "Visible", True)
COM_Invoke(pweb, "Navigate2", sUrl)
While, COM_Invoke(pweb, "ReadyState") <> 4 ; While, COM_Invoke(pweb, "Busy")
Sleep, 10
COM_Invoke(pweb, "document.all.Email.Value", Name)
COM_Invoke(pweb, "document.all.Passwd.Value", PW)
COM_Invoke(pweb, "document.all.signIn.click")
COM_Invoke(pweb, "Navigate2", sUrl2, 0x0800) ; 0x0800 parameter causes this webpage to be opened in a new tab
COM_Release(pweb) ; releases "pweb" - COM Object
COM_Term() ; terminates COM environment
Return
regarding this, I have two problems :
1. it seems that two Internet explorer windows are opened, one is blank and the other gmail, then the scripts stuck , I get messagebox concerening the "readystate" function which seems unautorized.
anyway, I can get over this , If I cancel the following line :
COM_Invoke(pweb, "Visible", True)
then one gmail webpage is loaded withouth stucking the script. and that's get me to the next problem:
2. the username & password isn't filled . seems there is a problem with the line : COM_Invoke(pweb, "document.all.Email.Value", Name)
running on vista. I have tried it on other websites and got the same results.
appreciate any help
[ Moderator!: Moved from Scripts and Functions ]
running COM commands on vista
Started by
panayotis
, Nov 14 2009 10:45 AM
2 replies to this topic
#1
-
Posted 14 November 2009 - 10:45 AM
This is a shot in the dark, especially since I'm not familiar with Vista. Try opening the Windows Task Manager and closing all the iexplore.exe processes before you run this code, and then see if you get the same results.
NOTE - in the future, please include code tags around the code you post :wink:
NOTE - in the future, please include code tags around the code you post :wink:
#2
-
Posted 14 November 2009 - 02:17 PM
Firstly kindly use code tags
sUrl := "http://www.gmail.com" Name := "UserName" PW := "Password" COM_Init() pweb := COM_CreateObject("InternetExplorer.Application") COM_Invoke(pweb, "Visible", True) COM_Invoke(pweb, "Navigate2", sUrl) [color=red]While, !pdoc:=COM_Invoke(pweb, "document") Sleep, 10 COM_Release(pdoc)[/color] While, COM_Invoke(pweb, "ReadyState") <> 4 ; While, COM_Invoke(pweb, "Busy") Sleep, 10 COM_Invoke(pweb, "document.all.Email.Value", Name) COM_Invoke(pweb, "document.all.Passwd.Value", PW) COM_Invoke(pweb, "document.all.signIn.click") ; im a little confused here why are we opening a tab and what is sUrl2 COM_Invoke(pweb, "Navigate2", sUrl2, 0x0800) ; 0x0800 parameter causes this webpage to be opened in a new tab COM_Release(pweb) ; releases "pweb" - COM Object COM_Term() ; terminates COM environment Returnthere are other methods that work here that are avail but the change i inserted should make most of this work
#3
-
Posted 15 November 2009 - 12:30 AM
Never lose.
WIN or LEARN.
WIN or LEARN.