AutoHotkey Community

It is currently May 26th, 2012, 7:08 pm

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: April 26th, 2009, 2:02 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
post your code i cant guess or read minds
If i were to guess i would say something changed in YOUR OS
figure out what and then you will know the source of the problem

_________________
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: April 26th, 2009, 5:32 pm 
Tank, it does it with everyone's sample IE scripts. For example, the one at the beginning of this script:

Code:
COM_AtlAxWinInit()
Gui, +LastFound +Resize
COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),top,left,width,height, "Shell.Explorer") )
pwb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),0,0,510,600, "Shell.Explorer") )
gui,show, w510 h600 ,Gui Browser
url:="http://www.runescape.com/game.ws?m=1&j=1"
COM_Invoke(pwb, "Navigate", url)
loop
      If (rdy:=COM_Invoke(pwb,"readyState") = 4)
         break
Return


My script would be far too much to post. But it does the same with the script above. I can switch windows fine unless there's any form of Java applet on the site. Does it not do it for you?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 26th, 2009, 7:01 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
it wouldnt have anything whatsoever to do with COM or an embeded browser even if it did which it doesnt somehting else has changed on your system

_________________
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: April 28th, 2009, 5:23 am 
I put it on a friend's computer, it does the exact same. Confusing. :?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2009, 2:44 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
Does it do it in an IE window?
if so its a behavior of the java
if it doesnt all it means is that its a behavior of java within the browser control wehn outside IE
eitherway its not a COM issue nor is there a way for me to alter how java works on your system or investigate the cause..
COM provides a means to communicate with apps not dictate how they work

_________________
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: April 28th, 2009, 5:25 pm 
This might be a "side-effect" of the Java Quick Starter (jsq.exe), that bugger also installs an ActiveX, and slows browsing down. You can disable jsq.exe in the Java Control Panel (Advanced -> Miscellaneous) and see if it makes a difference.

HTH


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 29th, 2009, 6:45 am 
Does it do it in an IE window? - Nope.

Also, I tried disabling Jqs, had no effect. :(.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 29th, 2009, 7:15 am 
After playing around with it further, I've found that it only does it if the Java applet has the focus while the window is switched.

So at their Java login applet, I can put in all my credentials and switch windows as long as I click somewhere else on the page first, so that the Java is no longer in focus. Strange.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 29th, 2009, 2:30 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
based on this conversation
Code:
GuiSize:
{
   if ErrorLevel = 1  ; The window has been minimized.  No action needed.
   {      
      click,0,0 ;;;; or somewhere else that has the desired effect   
      Return
   }
;;;;;of course if your particular browser control doesnt consume the entire gui you should addjust the parameters of winmove   
WinMove, % "ahk_id " . COM_AtlAxGetContainer(pwb), ,   0,   0,   A_GuiWidth,   A_GuiHeight
; Otherwise, the window has been resized or maximized. Redraw the control
}
Return

_________________
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: May 28th, 2009, 10:37 am 
Offline

Joined: June 24th, 2008, 8:30 am
Posts: 126
I am trying to use an exsisting IE instance, but keep getting the error mesage:
Quote:
Function Name: "Navigate"
Error: Unkown name.
(0x80020006)

Will Continue?


Here is the code i'm using:
Code:

COM_Init() ; Initialize COM - requires COM.ahk library
pageSearched:="Gmail: Email from Google"
Loop, %   COM_Invoke(psw := COM_Invoke(psh:=COM_CreateObject("Shell.Application"), "Windows"), "Count")
    {
       LocationName:=COM_Invoke(pwb:=COM_Invoke(psw, "Item", A_Index-1), "LocationName")
       IfInString,LocationName,%pageSearched%
         Break
       COM_Release(pwb) ;didnt break so release the one we didnt use
   }
java=some code to inject login info
COM_Invoke(psw, "Navigate", java)
COM_Release(pwb)
COM_Term()
Return


Anyone have an idea of what i'm doing wrong?

Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 1:27 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
Code:
COM_Invoke(pwb, "Navigate", java)

_________________
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: May 28th, 2009, 7:01 pm 
Offline

Joined: June 24th, 2008, 8:30 am
Posts: 126
Ok, now I get this error:
Quote:
Function Name: "Navigate"
Error: Object is not connected to server
(0x800401FD)

Will Continue?



This is the code i'm using:
Code:
COM_Init() ; Initialize COM - requires COM.ahk library
pageSearched:="Gmail: Email from Google"

Loop, %   COM_Invoke(psw := COM_Invoke(psh:=COM_CreateObject("Shell.Application"), "Windows"), "Count")
   {
      LocationName:=COM_Invoke(pwb:=COM_Invoke(psw, "Item", A_Index-1), "LocationName")
      IfInString,LocationName,%pageSearched%
         Break
      COM_Release(pwb) ;didnt break so release the one we didnt use
   }
COM_Invoke(pwb, "Navigate", java)
COM_Release(pwb)
COM_Term()
Return


Is there any criterea I should be meeting for the "pagesearched" variable? I'm not even sure which text to put in there. If it is just looking for the wintitle, if that is case sensitive, or if you can just put in part of the wintitle, or if it is looking for something completely different. That may not be my problem, but i'm not completely sure on how that works.

Thanks for the help Tank.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 8:29 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
apparently the window isnt found
you probably have the window title incorrect

_________________
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: May 28th, 2009, 9:44 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Hmm...you think he might be using the wrong call here, tank?

Code:
COM_Invoke(pwb, "ExecScript", java)

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 10:50 pm 
Quote:
Hmm...you think he might be using the wrong call here, tank?

I hope its right, i copied it from the tutorial on page one of this thread. But I must say, the com functions are over my head.


Quote:
apparently the window isnt found
you probably have the window title incorrect


Any help on what this is looking for? is it the full meta title as shown in on the window, is it the name on the tab, what should it be? I copied it exactly as shown on the wintitle so... not sure what i'm doing wrong.

thanks!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Scratch and 11 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