Jump to content

CliftonL

Members
  • Posts

    11
  • Joined

  • Last visited

CliftonL's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Well I sure thank all of you for your assistance. As of the patch Tuesday for Feb 10, 2015, this issue has been fixed. I was going to try and uninstall KB3025390 and thought I would try a windows update to see if MS had fixed problems created by that update. And sure enough, the problem that I've complained about in this thread has been fixed by today's patches. I consider this matter closed ... so it would seem.
  2. The alert does not show up in the browser when I run that code. What does KB3025390 do? I have it installed on my Windows 7 box.
  3. $oIE.document.parentWindow.evel("alert('hello world')") ... does not work either; in fact, I had already tried that too. I think what is happening is IE 11 is blocking function execution in this context. But when the browser control is embedded in a GUI, it allows the call to pass. I've even tried turning on/off protected mode to see if it would make any difference, but it didn't. I revised my approach to use a timer and cookies to pass data back and forth and that seems to be working for now, but that is not the approach I was hoping for.
  4. The functions perform in both environments, it is just that AutoIt cannot run any function in a window created with _IECreate(). I cannot even run a simple: $oIE.document.parentWindow.alert('hello world') I get the same error. The line number is because I'm used a compiled script with several dependencies. Anyway, if other ideas come to mind I would very much appreciate it.
  5. Hi all, I've built a web application which needs to save information to a local database file. I am using AutoIT as a bridge between the web application and the database via various JavaScript functions that I have included in the page(s). Problem: If I use _IECreateEmbedded(), I can access my functions and retrieve data this way and it works perfect: $oIE = _IECreateEmbedded( ... ) $data = $oIE.document.parentWindow.someFunction( params ) However, if I use _IECreate(), the functions always fail and I cannot figure out why: $oIE = _IECreate( ... ) $data = $oIE.document.parentWindow.someFunction( params ) (above line fails with this error message) $data = $oIE.document.title (this line returns the title just fine) Any ideas why I cannot get my functions to execute?
  6. Just call your function directly: $myRet = $oIE.document.parentWindow.UpdateCount() This is the way I do it and it doesn't seem to have any trouble. This way you don't need exeScript at all.
  7. Global $myArr[0] _ArrayAdd( $myArr, "Add this sting" ) _ArrayDisplay( $myArr ) The above code works in the latest stable version v3.3.12.0. It continued to work through version 3.3.13.6. Thereafter, the above code produces and empty array. If I change the declaration of $myArr[0] to $myArr[1] it works in all versions but it produces the undesirable result of an empty [0] index and the string is put in index [1]. Maybe I'm doing this incorrectly all along and the fact that it worked was a fluke in the first place. I've changed my code to delete the resulting empty index ( _ArrayDelete( $myArr, 0) ), but it seems like the original code should have worked. My intention is to create an empty array and populate it progressively as my script executes. From reading the help docs _ArrayPush() would not work in this scenario either because it would delete elements as they would be added. Your observations can only make me better at using this excellent tool!
  8. Hi, I'm having trouble with this code which is supposed to download an auto update installation file from my server. It seems that InetGetInfo() does not always return the bytes transferred the loop times out. I've allowed a generous time of 20 seconds for the timeout, but debugging indicates the bytes transferred are always 0 when this times out. Admittedly, this doesn't happen for all my clients, seems like the main issue is for those behind proxies. I've forced the headers on my server to set max-age=0 for the download file and turned off proxy caching. $fileSz = InetGetSize($webFile, 1) $hDownload = InetGet($webFile, $tmpFile, 1, 1) ;BEGIN DOWNLOADING IN BACKGROUND Sleep(250) $pMsg = " of " & $fileSz $pMsg2 = @LF & "Press ESC to cancel update." ProgressOn("Updating PowerPac ...", "Downloading installation file ... ", "Bytes transferred: 0" & $pMsg & $pMsg2, -1, -1, 16) $timeStamp = TimerInit() ;SET A TIMER IF NO BYTES ARE TRANSFERRED $timeout = False While 1 Sleep(120) $bytes = InetGetInfo($hDownload, 0) ;THIS FAILS FOR SOME CLIENTS????? If $bytes = $preBytes And TimerDiff($timeStamp) >= 20000 Then ;Times out at 20 seconds $timeout = true ;Sets timeout flag. Later determines the error message to display. ExitLoop ;NOTE: DESPITE FILE BEING AVAILABLE SOME CLIENTS GET TIMEDOUT BECAUSE $bytes = 0 ElseIf $bytes = $preBytes Then ContinueLoop Else $preBytes = $bytes $timeStamp = TimerInit() EndIf ProgressSet(($bytes / $fileSz) * 100, "Bytes transferred: " & $bytes & $pMsg & $pMsg2) If $bytes = $fileSz Then ExitLoop If _IsPressed("1B") Then ;USER PRESSED <ESC> TO CANCEL THE UPDATE PROCESS! InetClose($hDownload) FileDelete($tmpFile) Exit EndIf WEnd ProgressOff() ;AT THIS POINT $bytes = 0 and timeout occurs on some client machines??? Indicates download failed? Ideas gratefully appreciated.
  9. I just tried using a php file which uses filesize() to echo the file size in instances where the file size from InetGetSize() comes up 0. It works great. Still not sure this should be necessary though.
  10. I had this problem too and found that some proxy servers will not return the file size to the program. They do however return the bytes received. I used a default file size that is close but not absolute for those situations where a proxy interferes with getting the true file size. A better approach would be to use a php call on the server to filesize( [filename] ) as this would return the file size if the AutoIT function fails to get it. That should get around the proxy issues. Of course, someone else may have a comment on this as well. You should also make sure your server sends headers that set the max-age of your download file to 0 so any proxy server doesn't cache the file and cause even more issues, like not notifying AutoIT of the bytes streamed. Once I did that via .htaccess it helped a lot for my downloadable zip files, etc.
  11. I have a problem that just started since AutoIt v3.3.11.4 was released. My script is modifying an xml file created in another program. It searches for the end of the <resources> section and adds some additional file references. However, this is now failing in v3.3.11.4 beta. Consider this code: $idx = _ArraySearch($xmlArr, "</resource>" 0, 0, 0, 1, 0) This code used to work in v3.3.11.3 and returned the last index of the $xmlArr where the search string was found. Now this fails with @error 6 which means the string was not found, while _ArrayDisplay() indicates the value IS located in the array. Since the file has some white space (tabs, etc) before the string, I think it may be failing because I'm not using a regular expression. However, the spec for the function indicates a stingInStr search is supposed to be performed. Has anyone else found this to be a problem? I changed to using _ArrayFindAll() and the script works again.
×
×
  • Create New...