 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sun Apr 26, 2009 1:02 pm Post subject: |
|
|
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 _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Apr 26, 2009 4:32 pm Post subject: |
|
|
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? |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sun Apr 26, 2009 6:01 pm Post subject: |
|
|
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 _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Apr 28, 2009 4:23 am Post subject: |
|
|
I put it on a friend's computer, it does the exact same. Confusing.  |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Tue Apr 28, 2009 1:44 pm Post subject: |
|
|
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 _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Tue Apr 28, 2009 4:25 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Apr 29, 2009 5:45 am Post subject: |
|
|
Does it do it in an IE window? - Nope.
Also, I tried disabling Jqs, had no effect. . |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Apr 29, 2009 6:15 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Wed Apr 29, 2009 1:30 pm Post subject: |
|
|
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 |
_________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
smikkelsen
Joined: 24 Jun 2008 Posts: 104
|
Posted: Thu May 28, 2009 9:37 am Post subject: |
|
|
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! |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu May 28, 2009 12:27 pm Post subject: |
|
|
| Code: | | COM_Invoke(pwb, "Navigate", java) |
_________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
smikkelsen
Joined: 24 Jun 2008 Posts: 104
|
Posted: Thu May 28, 2009 6:01 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu May 28, 2009 7:29 pm Post subject: |
|
|
apparently the window isnt found
you probably have the window title incorrect _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
|
| Back to top |
|
 |
smikkelsen (not logged in Guest
|
Posted: Thu May 28, 2009 9:50 pm Post subject: |
|
|
| 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! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|