AutoHotkey Community

It is currently May 25th, 2012, 5:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 309 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 21  Next
Author Message
 Post subject:
PostPosted: May 22nd, 2007, 10:30 am 
Offline

Joined: May 16th, 2007, 3:24 pm
Posts: 11
Nice job Sean...

btw, is there any way to enable Tab button inside the browser? what I meant is something similar like IE, when we press the Tab button it will move through all the link and button in the webpage.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2007, 12:01 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
boge wrote:
btw, is there any way to enable Tab button inside the browser?

This is merely a WebControl, so that's not possible with it.
To make it possible, I think we need to access the DOM, which hasn't been done yet.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2007, 10:07 am 
I know this might be OOT...
but I use this webcontrol, and right now I'm still trying to find a way to fill in the form inside the webpage from ahk (without the needs to click and type).

Is that possible to be done??

Thanks a lot..


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2007, 9:22 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2540
Sean wrote:
corrupt wrote:
GuiClose: seems to be executed before the window is destroyed (at least the window is still visible).

OK, I added DestroyWindow, being commented initially. Thanks for figuring it out.
Instead of adding a commented line you could add a Gui Destroy line. That should work for everyone since the GUI window is always going to be destroyed after the GuiClose label in your example :) .
Code:
GuiClose:
Release(pwb)
Gui %A_Gui%:Destroy
CoUninitialize()
AtlAxWinTerm()
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 27th, 2007, 11:31 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
2 bogge

Its perhaps possible to create js wrapper that you can then issue via Navigate.

JS function will have to look like:

Code:
 FillForm( feld1, field2... fieldN) {
         //set the fields using DOM ID's here
  }


Then from AHK, you can call this function via navigate and construct its arguments within AHK:
Code:
     args := myEdit1 "," myEdit2 "," ... myEditN
     url := "FillForm(" args ")"

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 27th, 2007, 2:18 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
corrupt wrote:
Instead of adding a commented line you could add a Gui Destroy line.

Ah there exists a command Gui Destroy. I updated the script. Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 29th, 2007, 7:33 am 
@majkinetor
thx... isn't it means that I need to change the html?

@sean
I have a problem with IE_Ready command. When I submit the form, it immediately gives me status 4, infact it's not really loading the new page.

Thx a lot for your great works...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 29th, 2007, 9:16 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
boge as guest wrote:
I have a problem with IE_Ready command. When I submit the form, it immediately gives me status 4, infact it's not really loading the new page.

Isn't the page "about:blank"?
Would you add the following after IE_ReadyState() and tell me what's the output?

Code:
MsgBox, % IE_GetUrl(pwb) . " | " . IE_GetTitle(pwb)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 29th, 2007, 10:15 am 
The problem occurs on a webpage that redirect me to one of their server after I login.. i.e. main page: www.blabla.com, and when I login it redirect me to www4.blabla.com...
For this case IE_ReadyState immediately gives status 4.
I add the msgbox that you mentioned, and what I've got is www.blabla.com.

I just manage to find a rough solution for this problem by using !IE_Busy(pwb) function before IE_ReadyState(pwb) in my checkReady(pwb) function
Code:
   OK:=False
   Loop
   {
      if !IE_Busy(pwb)
       {
          if IE_ReadyState(pwb) = 4
          {
          OK:=True
            Break
          }
        }
        Sleep 100
   }
   Return OK


It seems like when I submit the form in the page, the value of IE_ReadyState() doesn't change...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 29th, 2007, 10:38 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
boge as guest wrote:
The problem occurs on a webpage that redirect me to one of their server after I login..

I'm not so sure if IE_Busy() won't have any side effect...
Anyway, this form may be preferable:

Code:
Loop
{
   If (IE_ReadyState(pwb) = 4) && !IE_Busy(pwb)
      Break
   Sleep 100
}
Return True


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2007, 12:01 pm 
thx Sean...

Btw, I tried also to use mozilla activex control that was mentioned by Daonlyfreez and it's answering my own question:
Quote:
is there any way to enable Tab button inside the browser?


again thanks to you who made IEControl.ahk very neat, so I can use mozilla activex control only by adding a few lines.

Anyway, for anyone who might be interested, by using the mozilla activex control we can get more control on the browser, like the Tab button is works again, and also you can just press enter to submit the form, etc...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2007, 1:50 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Quote:
thx... isn't it means that I need to change the html?

Not at all.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2007, 1:54 pm 
@majkinetor

I don't get it... for example if i want to fill the form from www.blabla.com, how can I use javascript without change the sourcecode?
Would you mind to give me a little example?

thx a lot


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2007, 1:59 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
boge as guest wrote:
Anyway, for anyone who might be interested, by using the mozilla activex control we can get more control on the browser, like the Tab button is works again, and also you can just press enter to submit the form, etc...

That's interesting. Thanks for the info!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2007, 2:14 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 968
Location: Frisia
Quote:
I don't get it... for example if i want to fill the form from www.blabla.com, how can I use javascript without change the sourcecode?
Would you mind to give me a little example?


You can feed the page a JavaScript one-liner with "Navigate".

Using one line JavaScript code to manipulate Web pages

PS: I'm very busy at the moment, but I'll rewrite my previous example code a.s.a.p.

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 309 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 21  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 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