Jump to content

Ximorro

Active Members
  • Posts

    30
  • Joined

  • Last visited

Ximorro's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi Gianni! Well, when creating a blank page using about:blank that's not necessary, at least in my tests the body is always ready immediately. That's how I use it so I left the code like that. (I use this to show small formatted help windows in my programs) You are right that when loading a web page, like with $oIE.navigate("https://www.example.com"), it's advisable to wait for it to be ready before modifying it. I already tried putting the waiting loop before accessing the body and it didn´t work but I didn't think about "readyState", let me test... IT WORKS! So the trick here is to use "$oIE.readyState" instead of "$oIE.busy". I misunderstood then this method because the documentatio says: Busy property: Gets a value that indicates whether the object is engaged in a navigation or downloading operation. So I thought that when not busy all was clear. So the explanation must be Autoit v3.3.16.1 needs more time to get the page ready and checking for busy (before accessing, not like in my example) is not enough because it can be "not busy" but still not completely ready. One question, where can I read info about those string status for readyState like 'complete' you use? In MSN documentation I only see reference to READYSTATE enumeration so only info about integer values (and the constants for C that we cannot use in AutoIt directly) Thanks Gianni! I'll check in my more convoluted programs but clearly checking for readyState instead of busy fixes these examples so I'm giving you the solution mark. Very appreciated, I was getting nuts, checking in different OS, x64 or x32, reinstalling v.3.3.14.5 (where it worked again)...
  2. Good day everybody, I just upgraded Autoit from version 3.3.14.5 to 3.3.16.1 and programs that use Shell.Explorer.2 COM Object are not working anymore. Nothing else has changed in the system, the program failed just after updating AutoIt. The original program is bigger but I can show the issue for instance in this small program to write in the body of the html document: #include <GuiConstants.au3> Global $GUI_IE, $btnCerrar, $oIE, $ancho = 200, $alto = 150 Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") #forceref $oErrorHandler $GUI_IE = GUICreate("Shell Explorer", $ancho,$alto, -1,-1, BitOr($WS_CAPTION, $WS_POPUP, $WS_CLIPCHILDREN)) $btnCerrar = GUICtrlCreateButton("Close", ($ancho-60)/2,$alto-30, 60,24) $oIE = ObjCreate("Shell.Explorer.2") GUICtrlCreateObj($oIE, 10,10, $ancho-20,$alto-46) $oIE.navigate("about:blank") ;$oIE.navigate("https://www.example.com") $oIE.document.body.innerHTML = "<p>HELLO</p>" While $oIE.busy Sleep(50) WEnd GUISetState(@SW_SHOW, $GUI_IE) While 1 Switch GUIGetMsg() Case $btnCerrar, $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($GUI_IE) $oIE=0 Func _ErrFunc($oError) ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc _ErrFunc() is showing error 0x00000003: "Object Invoke failed" in the line with [$oIE.document.body.innerHTML = "<p>HELLO</p>"] To narrow the problem source I have split the access to the property with: Global $doc = $oIE.Document ConsoleWrite("Document is Object: " & IsObj($doc) & @CRLF) ;Returns 1 (object ok) Global $body = $doc.body ConsoleWrite("body is Object: " & IsObj($body) & @CRLF) ;Returns 0 (not object!) $body.innerHTML = "<p>HELLO</p>" ;Obviously fails since $body is not an object $oiE.Document works and I can invoke other methods on $doc. But $doc.body doesn´t return an object (Error: Object Invoke failed). Please notice: the problem is not starting with "about:blank", you can navigate to a full page (like "http://www.example.com" or "https://www.autoitscript.com") and body property is not accessible either. The problem isn't that I try to modify it with innerHTML, just trying to read the body already fails. All this worked without changes in v3.3.14.5. I know in the last version there have been some changes in COM error handling but I don't think I have to do something different to avoid the error in this version. Am I doing anything wrong? Thank you.
  3. That's it! So the portable version didn't find Abbreviations file in its correct folder. Cool you found the problem (and the solution!) Thanks guinness!
  4. Thank you very much, Ward! I had solved my problem adding the size of the original data to the compressed binary (in my calling code, I didn't change the udf). But your compression library, and also the others about hashing and encription are something I add to my list of resources. Congratulations for your amazing work! By the way, this "Dll in Memory" udf only works in Autoit3.6, right? I tried it in v3.3 but nothing happens (I just fixed compilation errors, like changing OnAutoItExitRegister to the Option() mechanism in 3.3, but DLL functions are not called correctly).
  5. Hi monoceres. Good work, simple and effective solution! Did you implemented your idea about storing uncompressed data size? It's very strange the DLL needs that information, is there any other call in the library that doesn't have that requirement? It's very limited, to decompress you must now the size of the original data, it's almost as having to know the original data itself...
  6. Fantastic! It works perfectly! Was it very difficult to dig in such a long script? The problem with this approach is that it will have to be changed for every new version I think it's the only solution though, if developers don't change it in the official version. Thank you very much, I'm using it right now! And now for autocompletion, I don't understand why it isn't working, it doesn't need Autoit, it's just a Scite issue. It's autocompleting keywords, but not abbreviations.
  7. @BrewManNH In your bat file in comment 53 I found it is necessary to add the drive letter to SciTE_HOME or it fails for me when the portable and the source are in different drives. That is, just to change: set SciTE_HOME=%~p0SciTE To set SciTE_HOME=%~dp0SciTE
  8. I like portable versions and there's no problem when no installed version exists. I understand it's not a general problem, but sometimes you face it, though. For instance I take my AutoIt in a USB drive and if I need to change a program (or make a quick new one) it's very handy. But in case the target computer has an installed version I don't want to affect it or be affected by it. Other possibility portables offer us is to test new versions of the program when you are currently using a previous one. Well, don't worry, the problem is difficult to solve without modifying the wrapper and in the general case it works perfectly. I will live with that Thankyou for your time!
  9. It seems that in order to make a real portable AutoIt, it should be necessary to change the wrapper itself so that programs are looked for in a different order a) autoit3dir wrapper parameter b ) register or Program Files c) Current Scite dir In that way using autoit3dir parameter in Scite when invoking the wrapper we could build a full portable version. I think it would not be very difficult for developers to manage obfuscator, tidy and others in the same way they do with the interpreter or the checker (using autoit3dir parameter when present, before looking in Program Files or the register). I appreciate guinness work and I'm sure it works perfectly when there's no installed AutoIt in the system (or at least it's the same version that the portable one). It's just I can't take profit of this in my particular configuration, it's a pity By the way, as I imagine you have noticed, English is not my native language. Excuse my ignorance, but.... what's the meaning of "OP" in "I will add to the OP of the warning"?
  10. Ok thank you Is autocompletion working for you? By the way, in au3.properties you should also add /autoit3dir "$(autoit3dir)" to lines executing AU3Check through AutoIt3Wrapper, so that it doesn't use the one in Program Files. (In the original file this means lines 86 and 93)
  11. Hum, It isn't working for me... Ah, running with the default _AU3() is ok but if I change it to _AU3(-1,-1,1) (in order to save the session) it doesn't work. It was ok in v2. Edit: Forcing the parameters, i.e. _AU3(@ScriptDir, "App", 1) it's working again. But the problems with obfuscator and autocompletion remain...
  12. Yes, the official one. In fact I've got two versions (3.3.0 and 3.3.6), both copied from an installed version, and they have the same problems. The installed version that remains in my system is 3.3.0, and I want the portable to be 3.3.6.1 Excuse me about the configuration writing, I didn't realize the default was NOT to write it. I've changed the execution call to _AU3(-1,-1,1) and now it is storing the session perfectly. But he other problems remain, and I have found another one: when running with F5 the checker is ok, but when performing only the checking (CTRL+F5) au3Check is executed from Program Files! NOTE: I've upgraded your launcher to version V3, but now it's not working: Was unable to read the "au3.properties", please check the AutoIt directory and configuration. But nothing more has changed, only the script!
  13. Sorry, it isn't working perfectly. au3check and autoit3.exe are ok, good! But obfuscator is executed from Program Files, and autocompletion is not working. Besides, is it suppose to write its configuration to Data folder? It doesn't write anything, and when I open again the portable Scite is always maximized and doesn´t open the scripts I was editing in the last session. Ah, and yes, I use the full Scite.
  14. Hi guinness, I've got a copy of an installed autoit in the app directory for the portable. Now my question is, what do I have to do to execute your script correctly? I mean, do I have to put it in the same directory as autoit3.exe, scite.exe or where? And, do I have to run it each time I want to execute the portable or just the fist time to modify configuration files? thanks
  15. Have you used it in a computer with a previosly installed version? And a different one, of course, for instance a v3.3.0.0 and a v3.3.6.1 Are the installed and portable versions executing their own programs (compiler, checker, obfuscator, etc...)? ---- By the way, changing au3.properties I'm not able to change the execution path of Obfuscator, is that configuration in another file?
×
×
  • Create New...