AutoHotkey Community

It is currently May 26th, 2012, 4:26 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 309 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19 ... 21  Next
Author Message
 Post subject:
PostPosted: March 8th, 2009, 10:07 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
Anonymous wrote:
How can one focus the embedded explorer?

GuiControl, Focus, Internet Explorer_Server1

doesn't seem to work
i dont understand the question
it has focus when you click it for sure are you after a particular element ?
explain your intent

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 10:20 pm 
What does this line do?
Code:
COM_Invoke(pweb,"document.parentwindow.execscript","alert('javascript')")


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 10:21 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
executes a javascript alert from the browser object referenced by pweb

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 10:28 pm 
tank wrote:
i dont understand the question
it has focus when you click it for sure are you after a particular element ?
explain your intent


I'd like to put keyboard focus onto the embedded IE control programatically, so when the GUI appears the embedded IE can be scrolled immediately with the cursor keys without having to click on it first with the mouse.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 10:44 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
you should read the thread
http://www.autohotkey.com/forum/viewtop ... 999#219999

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2009, 6:18 am 
Thank you.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2009, 10:13 pm 
I tried IE4AHK and other embedded IE GUIs and it seems to me I cannot copy text from the embedded IE window.

Paste does nothing or pastes the thing previously copied elsewhere.

Isn't copy/paste supported here?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 20th, 2009, 11:06 pm 
Offline

Joined: November 19th, 2008, 12:06 am
Posts: 101
Sean wrote:
soccer18soccer18 wrote:
What does the IE_SaveAs command do?
It does what does Save as ... command in the menu bar.


i knew that. thats not what i meant. i meant how do you use it?

and whats the difference between IE_Save and IE_SaveAs?



thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 6:35 pm 
Offline

Joined: November 27th, 2008, 9:44 am
Posts: 62
[quote]
Code:
WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
;  Critical 20
tooltip % wparam
  ;If  (wParam = 0x09 || wParam = 0x0D || wParam = 0x2E || wParam = 0x26 || wParam = 0x28) ; tab enter delete up down
  If  (wParam = 9 || wParam = 13 || wParam = 46 || wParam = 38 || wParam = 40) ; tab enter delete up down
  {
      WinGetClass, Class, ahk_id %hWnd%
     
      If  (Class == "Internet Explorer_Server")
          {
             Global pipa
             VarSetCapacity(Msg, 28)
             NumPut(hWnd,Msg), NumPut(nMsg,Msg,4), NumPut(wParam,Msg,8), NumPut(lParam,Msg,12)
             NumPut(A_EventInfo,Msg,16), NumPut(A_GuiX,Msg,20), NumPut(A_GuiY,Msg,24)
             DllCall(NumGet(NumGet(1*pipa)+20), "Uint", pipa, "Uint", &Msg)
             Return 0
          }
  }
}


Using this code, I can get everything but the "Enter" keystroke to work in an IE control. I double-checked the vkcode, and it is correct. Does anybody have ideas as to why "Enter" specifically would not work?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2009, 12:34 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
rulfzid wrote:
Using this code, I can get everything but the "Enter" keystroke to work in an IE control. I double-checked the vkcode, and it is correct. Does anybody have ideas as to why "Enter" specifically would not work?
FYI, Enter key works fine with both IE7 & IE8 in my English XPSP3. I noticed you added tooltip, did you confirm the key appeared in tooltip? Then, I suggest to check the classname Class too.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2009, 1:31 am 
Offline

Joined: November 27th, 2008, 9:44 am
Posts: 62
Sean wrote:
rulfzid wrote:
Using this code, I can get everything but the "Enter" keystroke to work in an IE control. I double-checked the vkcode, and it is correct. Does anybody have ideas as to why "Enter" specifically would not work?
FYI, Enter key works fine with both IE7 & IE8 in my English XPSP3. I noticed you added tooltip, did you confirm the key appeared in tooltip? Then, I suggest to check the classname Class too.


The key did appear in the tooltip, with the correct code.

It's weird, I added a tooltip to show me the class after the WinGetClass command, and it says "Internet Explorer_Server", but AHKWindowInfo shows me "Internet Explorer_Server1".

Now, that said, up, down, and tab work just fine when the class checks for "Internet Explorer_Server", but nothing works for me when i append the "1".

I'm also getting the same behavior on XPSP3 and Windows 7.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2009, 3:56 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
rulfzid wrote:
It's weird, I added a tooltip to show me the class after the WinGetClass command, and it says "Internet Explorer_Server", but AHKWindowInfo shows me "Internet Explorer_Server1".
The number 1 etc is AHK's custom index appended to the class name to differentiate among the controls with the same class name.
Quote:
Now, that said, up, down, and tab work just fine when the class checks for "Internet Explorer_Server"
Post the whole code you used and explain where it didn't work, or if you don't want to, then I suggest to test it with the well-known page, e.g. Google. The form field itself can ignore the key strokes.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2009, 5:45 am 
Offline

Joined: November 27th, 2008, 9:44 am
Posts: 62
Sean wrote:
Post the whole code you used and explain where it didn't work, or if you don't want to, then I suggest to test it with the well-known page, e.g. Google. The form field itself can ignore the key strokes.


Code:
#SingleInstance force

Gui, +LastFound +Resize
Gui, Show, w350 h500, Gmail Tasks via AHK
mgh := WinExist()
OnMessage(WM_KEYDOWN:=0x0100, "WM_KEYDOWN")
COM_AtlAxWinInit()
pwb := COM_AtlAxCreateControl(mgh, "Shell.Explorer")
pipa := COM_QueryInterface(pwb, "{00000117-0000-0000-C000-000000000046}")
COM_Invoke(pwb, "Navigate","https://mail.google.com/tasks/ig")

return

GuiClose:
   Gui, Destroy
   COM_Release(pipa)
   COM_Release(pwb)
   COM_AtlAxWinTerm()
ExitApp


WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
    ; backspace tab enter delete up down
     If  (wParam = 0x8 || wParam = 0x09 || wParam = 0x0D || wParam = 0x2E || wParam = 0x26 || wParam = 0x28)
     {
         WinGetClass, Class, ahk_id %hWnd%
         If  (Class = "Internet Explorer_Server")
             {
                Global pipa
                VarSetCapacity(Msg, 28)
                NumPut(hWnd,Msg), NumPut(nMsg,Msg,4), NumPut(wParam,Msg,8), NumPut(lParam,Msg,12)
                NumPut(A_EventInfo,Msg,16), NumPut(A_GuiX,Msg,20), NumPut(A_GuiY,Msg,24)
                DllCall(NumGet(NumGet(1*pipa)+20), "Uint", pipa, "Uint", &Msg)
                Return 0
             }
     }
}


I think it may have something to do with the Gmail Tasks app specifically, because Enter seems to work if I navigate to google.com.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2009, 8:19 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
rulfzid wrote:
I think it may have something to do with the Gmail Tasks app specifically, because Enter seems to work if I navigate to google.com.
Enter works with the script in my test. I don't know why it didn't work with you, however, you may add one more line.
Code:
OnMessage(WM_KEYUP:=0x0101, "WM_KEYDOWN")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2009, 8:58 am 
Offline

Joined: November 27th, 2008, 9:44 am
Posts: 62
Code:
#SingleInstance force

Gui, +LastFound +Resize
Gui, Show, w350 h500, Gmail Tasks via AHK
mgh := WinExist()
OnMessage(WM_KEYDOWN:=0x0100, "WM_KEYDOWN")
OnMessage(WM_KEYUP:=0x0101, "WM_KEYDOWN")
COM_AtlAxWinInit()
pwb := COM_AtlAxCreateControl(mgh, "Shell.Explorer")
pipa := COM_QueryInterface(pwb, "{00000117-0000-0000-C000-000000000046}")
COM_Invoke(pwb, "Navigate","https://mail.google.com/tasks/ig")

return

GuiClose:
   Gui, Destroy
   COM_Release(pipa)
   COM_Release(pwb)
   COM_AtlAxWinTerm()
ExitApp


WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
   ; backspace tab enter delete up down
     If  (wParam = 0x8 || wParam = 0x09 || wParam = 0x0D || wParam = 0x2E || wParam = 0x26 || wParam = 0x28)
     {
         WinGetClass, Class, ahk_id %hWnd%
         If  (Class = "Internet Explorer_Server")
             {
                Global pipa
                VarSetCapacity(Msg, 28)
                NumPut(hWnd,Msg), NumPut(nMsg,Msg,4), NumPut(wParam,Msg,8), NumPut(lParam,Msg,12)
                NumPut(A_EventInfo,Msg,16), NumPut(A_GuiX,Msg,20), NumPut(A_GuiY,Msg,24)
                OutputDebug, % wParam " : " DllCall(NumGet(NumGet(1*pipa)+20), "Uint", pipa, "Uint", &Msg)
                Return 0
             }
   }
}


I added the extra OnMessage and an OutputDebug for the DllCAll.

Interestingly, for the keys that work (up, down, backspace, delete, tab), it returns a 0 for the keydown and a 1 for the keyup.

For the Enter key, however, it returns 1 for both. I have absolutely no idea why.

Quote:
[4664] 8 : 0
[4664] 8 : 1
[4664] 9 : 0
[4664] 9 : 1
[4664] 46 : 0
[4664] 46 : 1
[4664] 38 : 0
[4664] 38 : 1
[4664] 40 : 0
[4664] 40 : 1
[4664] 13 : 1
[4664] 13 : 1



And here's the really weird thing: when I change the url to "http://www.google.com", the same series of OutputDebug logs shows:

Quote:
[5364] 38 : 0
[5364] 38 : 1
[5364] 40 : 0
[5364] 40 : 1
[5364] 8 : 0
[5364] 8 : 1
[5364] 46 : 0
[5364] 46 : 1
[5364] 9 : 0
[5364] 9 : 1
[5364] 13 : 0
[5364] 13 : 1


Can other people test this and see if you get similar results?


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 ... 13, 14, 15, 16, 17, 18, 19 ... 21  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher, maul.esel and 15 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