Jump to content

HeinMueck

Members
  • Posts

    12
  • Joined

  • Last visited

HeinMueck's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. In my case, I did put the code as you advise from the beginning, but the "Access is denied" error here was clearly related to the setting of the 1601 regkey. I fiddled with the key, but it seems that in some environments you cannot supress the dialog when it is actualy the first time you submit a form. Even setting the regkey in advance does not save you from it (in my case IE6 on win 2003 terminal server). I could not trigger the same problem on a winxp workstation with IE7. There, writing 0 to the key at the start of the script was clearly enough. But I may be wrong anyway I used a fresh installed XP on a vmware with various snapshots and all worked out of the box, 6,7 and 8. Fresh accounts on the terminal server seem to be different, may be the same with domain accounts. After I could see the dialog and confirmed it once, everything was fine. Even the once problematic code using _IEFormSubmit worked without a change, no more access issues. Hein
  2. Thanks Dale, I solved all issues that I mentioned - here is what I did: IE6: The issue was that IE was asking if it is okay to send the form data (usually happens after ie installation once and then you kick it), but the dialog did not show up because of silent mode. I changed the code to show the dialog box to the user. Dim $oIE = _IECreateEmbedded() dim $IEview = GUICtrlCreateObj($oIE, 0, 0, 920, 650) $oIE.Silent = FalseoÝ÷ ØùZq騬jh®Ö§¶+]¡ë'¢Ü(®HÊ©ºØ­®(!µ§íz»azãyËlr·¶*'wr¢éÞyÛh±ëb¶Új[t¢½h­©ò¶§'­¶)à²)^Ûh}©ly©l¢¥¦Ëh±ç­êk£­ç^ØÇbjZ ü¨º¯zÚºØ^Øj×­¡ªk£¶«Â+ʰ¢é]`zØ­jwmì"Ú0²ËZÊÆåjyMg(ºWm+z·²ß¢»azÊ&zئzË©®+" ®¢Ðqë,Ç^'ªê-zºè®Ì!z{.nh­¶)à~æ±.q©äwhi­çâÇm+ÊÇ­¶)දj[{az· Ëkɩݩ²êÞ~æu«Zq©ÚrÛzǧu«­¢+ÙI]É¥Ñ ÅÕ½Ðí!-e} UII9Q}UMHÀäÈíM½ÑÝÉÀäÈí5¥É½Í½ÐÀäÈí]¥¹½ÝÌÀäÈí ÕÉɹÑYÉÍ¥½¸ÀäÈí%¹ÑɹÐMÑÑ¥¹ÌÀäÈíi½¹ÌÀäÈìÌÅÕ½Ðì°ÅÕ½ÐìÄØÀÄÅÕ½Ðì°ÅÕ½ÐíI}]=IÅÕ½Ðì°À Find a list of other values Microsoft Technet IE8: It was an easy one. The registration of the control was corrupted. Just run regsvr32 to 'fix' it. regsvr32 C:\WINDOWS\system32\shdocvw.dll Hope that helps someone sometime Cheers, Hein
  3. Hi! Im trying to write a simple frontend for some webpages using the _IE* UDF's. In general - trivial But: Users have from IE6 up to IE8 on XP and Vista, maybe Win2k. So I was doing some tests with a simple scenario that contains all the stuff I would need and run it on different systems. The code below puts up some issues, which I would like to discuss and maybe get rid off. IE7 on XP: I have two machines, one fresh installed and one as my development machine. Both are fine, no issues with that code, all works as expected. IE6 on XP: Google opens, but when I try to submit the form and perform a search, just nothing happens. I also tried to work with _IEFormSubmit, but what did it on my machine and on IE8 lead to "Access is denied" errors on IE6. I turned off all security switches - nothing changed. I will dig on that, but if someone has a hint about making submit work (ah, also happens when IE is opened with _IECreate()) I would be pretty happy IE8 on XP: My biggest concern. Line 19 puts up a COM Error. IETest.au3 (19) : ==> Error in expression.: dim $SinkObject = ObjEvent($oIE, "IEEvent_", "DWebBrowserEvents2") dim $SinkObject = ^ ERROR Without the line, the script runs fine. But I do not get the events though. Hmm. It would be great if some of the forum members could run the script and give some feedback if you find more issues or if you found a solution for one of the problems. Thanks! Hein #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <IE.au3> #include <GUIConstants.au3> ; Script Start - Add your code below here Dim $oIEErrorHandler = _IEErrorHandlerRegister("MyErrFunc") Dim $gui = GUICreate("Test", 920, 650, -1, -1) Dim $oIE = _IECreateEmbedded() dim $SinkObject = ObjEvent($oIE, "IEEvent_", "DWebBrowserEvents2") dim $IEview = GUICtrlCreateObj($oIE, 0, 0, 920, 650) _IENavigate($oIE, "http://www.google.com", 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Func IEEvent_DocumentComplete ($document, $url) ConsoleWrite("Done: " & $url & @crlf) EndFunc Func MyErrFunc() ; Important: the error object variable MUST be named $oIEErrorHandler $ErrorScriptline = $oIEErrorHandler.scriptline $ErrorNumber = $oIEErrorHandler.number $ErrorNumberHex = Hex($oIEErrorHandler.number, 8) $ErrorDescription = StringStripWS($oIEErrorHandler.description, 2) $ErrorWinDescription = StringStripWS($oIEErrorHandler.WinDescription, 2) $ErrorSource = $oIEErrorHandler.Source $ErrorHelpFile = $oIEErrorHandler.HelpFile $ErrorHelpContext = $oIEErrorHandler.HelpContext $ErrorLastDllError = $oIEErrorHandler.LastDllError $ErrorOutput = "" $ErrorOutput &= "--> COM Error Encountered in " & @ScriptName & @CR $ErrorOutput &= "----> $ErrorScriptline = " & $ErrorScriptline & @CR $ErrorOutput &= "----> $ErrorNumberHex = " & $ErrorNumberHex & @CR $ErrorOutput &= "----> $ErrorNumber = " & $ErrorNumber & @CR $ErrorOutput &= "----> $ErrorWinDescription = " & $ErrorWinDescription & @CR $ErrorOutput &= "----> $ErrorDescription = " & $ErrorDescription & @CR $ErrorOutput &= "----> $ErrorSource = " & $ErrorSource & @CR $ErrorOutput &= "----> $ErrorHelpFile = " & $ErrorHelpFile & @CR $ErrorOutput &= "----> $ErrorHelpContext = " & $ErrorHelpContext & @CR $ErrorOutput &= "----> $ErrorLastDllError = " & $ErrorLastDllError ConsoleWrite($ErrorOutput) SetError(1) Return EndFunc ;==>MyErrFunc
  4. Hi, I'm trying to do a inetget through a proxy that requieres authentication. Apart from not beeing able to distinguish between proxies that want auth and proxies that don't because of the missing @error docs (http://www.autoitscript.com/forum/index.php?showtopic=84709), I found out that when specifying credentials to a proxy InetGet will fail anyway. Something seems to be broken here. I tried it with 3.2.4.9 and 3.2.12.1, both the same. Proxy is a Squid3 with basic auth and works fine ans as expected from that machine for IE and Firefox. I know the docs say "Only CERN proxy servers are supported." Does this mean that AutoIt only supports THE (mindboggingly stoneaged) CERN httpd or is a squid being considered as CERN-like enough to work with it, too? $ret = HttpSetProxy(2, "192.168.1.38:8080", "user", "password") If $ret == 0 Then MsgBox(16, "Example", "Proxy Error") Exit EndIf $ret = InetGet("http://www.google.com/index.html", @TempDir & "\test.file.html", 1, 0) MsgBox(0, "Example", "Result: " & $ret) If you lower the curtains on the proxy and try it without auth it works. Is there any way around it? Cheers, Hein
  5. Hi, I was just looking for some hints how InetGet sets @error on errors. And I stumbled over this very old thing: http://www.autoitscript.com/forum/index.php?showtopic=29708 Is this still the status quo or could the error codes be usefully documented by now? See my actual problem: AutoIt has two http related functions I use here, HttpSetProxy ( mode [, "proxy:port" [, "username", "password"]] ) InetGet ( "URL" [,"filename" [, reload [, background]]] ) I'm in a network, where the proxy is figured out by a pac script and it works fine with HttpSetProxy. In some parts of the network I can use the proxy without authentication, in some I need to specify a username/password. The problem is, that Autoit does not open the usual credentials dialog when IE hits a proxy that requieres authentication. So the InetGet just fails without a useful error code. If it would say "Hey, the proxy asks you to specify a username and password", I could ask that from the user, redo HttpSetProxy and try again. But because I cannot figure that out, the only way would by to ask a username and password in any case, even if it is not needed or even does not fix the problem, as a failure of InetGet could also indicate that the target server is down. So not a cool user experience I see that InetGet sets @error, but is there a way to figure out from these values that the proxy wants credentials? That would be the only case I would like to diff from all other problems. Any way? Cheers, Hein
  6. Well, yes, this was said before. And in GuiRegisterMsg() I can open a message box saying "Received it" But why can't I just put something on the Messagequeue that is read by GuiGetMsg? Does AutoIt have it's own? Or are controls posting to the windows queue with _WinAPI_PostMessage and GUIGetMsg uses _WinAPI_GetMessage to read them? If so, I can place a message in the queue with _SendMessage that would be read by GUIGetMsg() - and it would be the way to do this. Cheers, Hein
  7. Hmm, yes, things might work that way. If you have a global dummy, then you can shoot something from an external process from behind through the breast into the eye ) But handling all messages in the one and only loop directly would be the best way, I think. I'm sure GUIGetMsg() get's the message from the message queue where _SendMessage would also put it's data. It just reacts on specially crafted messages. Perhaps I can try to use the GetMessage API call to get one of those and inspect it. If I can do that, I will post some info here. Let's see how far we can get. Cheers, Hein
  8. Hi Malkey, using GUICtrlCreateDummy() is also an idea one could follow. But then the sending script, wich is independ from the first, the waiting script, would need to know at least the handle of the dummy control. And I could not find a way to get it, for instance by using ControlGetHandle(). Cheers, Hein
  9. Hi Rasim thanks, yes, kind of. But I was trying to figure out if there is a chance to process the _SendMessage directly with GUIGetMsg(). So without the need to register a separate message handler. There must be a way to place the message in the message queue in a way that GUIGetMsg can dispatch it ... maybe even using the wparam and lparam by setting the advanced flag to 1 ... Would be so cool Another thing one would need to respect is the range of numbers that are created by the GUICtrlCreate... functions. To define the custum event one should choose a number that is usually not received by GUIGetMsg(). Cheers, Hein
  10. Well, the situation is the following: I have a Gui that spawns a bunch of processes through an ActiveX component. Some of them start other processes and return. So the started process might end before the processing itself has finished. But I have the chance to start a script at the end of processing. Now I would like this script to send a message to the GUI when the processing is done. As a rough example: Global Const $MY_MESSAGE = 0x99999 GUICreate("Control Program", 800, 600) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $MY_MESSAGE Then ExitLoop WEnd GUIDelete() So if I could use _SendMessage() to send $MY_MESSAGE to the GUI, it would work without global vars. The question is how you need to set the params for _SendMessage() that GUIGetMsg() recognizes it. Cheers, Hein
  11. Hi Guys! I am looking for a way to send a user defined message to an AutoIt GUI with _SendMessage that is recognized by GUIGetMsg()? I guess it is only setting the correct parameters for _SendMessage, but I could not find any docs or examples telling me what to put in. I see that there are some examples using GUIRegisterMsg(), but that is not what I had on my mind ;-) Any hints? Cheers, Hein
×
×
  • Create New...