AutoHotkey Community

It is currently May 27th, 2012, 3:44 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: July 23rd, 2010, 3:45 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
When i try to use the command
iWeb_nav(Net,"http://10.0.0.39/")
i get an error.
The error is
The browser you tried to navigate to http://10.0.0.39/ with is not valid.

Can iweb commands be used on an in house private web site?
Here is a copy of my script.
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

; Log into work net prog



;  Fill in user name with admin
iWeb_getDomObj(pwb,"47")
iWeb_clickDomObj(pwb,"47")
iWeb_setDomObj(pwb,"47", "admin")

; Fill in password with test12
iWeb_getDomObj(pwb,"53")
iWeb_clickDomObj(pwb,"53")
iWeb_setDomObj(pwb,"53", "test12")

; Click submit
iWeb_getDomObj(pwb,"58")
iWeb_clickDomObj(pwb,"58")
iWeb_setDomObj(pwb,"58", "Submit")

; Initialize
iWeb_Init()
COM_CoInitialize()
pwb:=iWeb_getWin("Login Page")
iWeb_nav(Net,"http://10.0.0.39")

;Terminate
COM_Release(pwb)
COM_CoUninitialize()

Any help would be great
TYVM in advance

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 3:55 pm 
See if either of the following work:
Code:
COM_Invoke(Net,"Navigate","http://10.0.0.39/")
COM_Invoke(Net,"Navigate2","http://10.0.0.39/")

Also, should it be iWeb_nav(pwb,"http://10.0.0.39/") ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 4:13 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
a4u wrote:
See if either of the following work:
Code:
COM_Invoke(Net,"Navigate","http://10.0.0.39/")
COM_Invoke(Net,"Navigate2","http://10.0.0.39/")

Also, should it be iWeb_nav(pwb,"http://10.0.0.39/") ?


neither work with an error like
Function Name : navigate or navigate2
error: The COM Object may not be valid dispatch Object!
First ensure that COM library has been initialized through COM_Int()

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 8:15 pm 
Quote:
First ensure that COM library has been initialized through COM_Int()
which you've done meanwhile!?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 8:40 pm 
Isnt
COM_CoInitialize()
the same as
COM_Int()
?


Report this post
Top
  
Reply with quote  
 Post subject: COM_Init()
PostPosted: July 23rd, 2010, 8:44 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
looks like COM_Init() is the command i want.
this at least allows the web sight to load as it gives me the error that its not valid.

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 9:03 pm 
I wrote:
Also, should it be iWeb_nav(pwb,"http://10.0.0.39/") ?

An implied question would be, have you also tried:
Code:
COM_Invoke(pwb,"Navigate","http://10.0.0.39/")
COM_Invoke(pwb,"Navigate2","http://10.0.0.39/")


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 9:20 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
sorry yes i have tried
COM_Invoke(pwb,"Navigate","http://10.0.0.39/")

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2010, 10:39 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Just to make sure we're all working from common code, try both of these and let us know if either or both of them work:

Code:
iWeb_Init(), pwb := iWeb_getWin("Login Page")
iWeb_nav(pwb,"http://10.0.0.39")
iWeb_Release(pwb), iWeb_Term()


Code:
iWeb_Init(), pwb := iWeb_newIE(), iWeb_Complete(pwb)
iWeb_nav(pwb,"http://10.0.0.39")
iWeb_Release(pwb), iWeb_Term()

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2010, 4:09 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
Same thing with both.
The browser you tried to navigate to http://10.0.0.39/ with is not valid.

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Try all over again
PostPosted: July 26th, 2010, 4:20 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
Let me start this all over.

This is the code that does not bring up any errors when IE loads up.
Code:
;  Fill in user name with admin
iWeb_getDomObj(pwb,"47")
iWeb_clickDomObj(pwb,"47")
iWeb_setDomObj(pwb,"47", "admin")

; Fill in password with test12
iWeb_getDomObj(pwb,"53")
iWeb_clickDomObj(pwb,"53")
iWeb_setDomObj(pwb,"53", "test12")

; Click submit
iWeb_getDomObj(pwb,"58")
iWeb_clickDomObj(pwb,"58")
iWeb_setDomObj(pwb,"58", "Submit")


iWeb_Init(), pwb := iWeb_newIE(), iWeb_Complete(pwb)
iWeb_nav(pwb,"http://10.0.0.39/winsort")
iWeb_Release(pwb), iWeb_Term()


But ie never loads the web page.
after a min. i get this error
COM error notification
Fuction name "document"
Error unspecified error
(0x80004005)
Prog:
Desc:
Help: ,o
Will continue yes will bring up

COM error Notification
Function Name: "ready state"
Error: The com object may not be a valid dispatch Object!
First ensure that COM library has been initialized through COM_Init()

hit yes and i go back to the 1st error and im trapped in a loop



Code:
iWeb_Init(), pwb := iWeb_getWin("Login Page")
iWeb_nav(pwb,"http://10.0.0.39/winsort")
iWeb_Release(pwb), iWeb_Term()

Does nothing after the browser you tried to navigate to http://10.0.0.39/winsort with is not valid.

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject: pic of the site
PostPosted: July 26th, 2010, 4:49 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
And here is the link to see the picture of how i got the info for the web site.
http://rapidshare.com/files/409195335/log_in.bmp
The picture has the iweb browser 2 learner prog up and the web site im trying to access

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2010, 4:07 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
also tried to change my script to this and had not luck.
Code:
iWeb_Init()
COM_Init()
pwb:=iWeb_getwin("Login Page")
iWeb_setDomObj(pwb,"referUrl,userName,password,",",admin,,")
COM_Invoke(pWin:=iWeb_DomWin(pwb),"document.forms[logonForm].submit")
iWeb_Release(pWin)
iWeb_Release(pwb)
iWeb_Term()

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2010, 4:29 pm 
Offline

Joined: August 26th, 2007, 12:23 am
Posts: 50
Location: USA
just found out that is i have the web page all ready open and on the right web site then my script will inject the user name admin.
but thats all it will do.

_________________
~ B r () n c ()


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, Wicked and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group