Valuater Posted March 24, 2009 Share Posted March 24, 2009 (edited) demo script... #include <IE.au3> $File = FileOpenDialog("VirusTotal", @DesktopDir, "All (*.*)" ) $oIE = _IECreate("http://www.virustotal.com") $hwnd = _IEPropertyGet($oIE, "hwnd") $oForm = _IEFormGetCollection($oIE, 0) $oFile = _IEGetObjByName($oForm, "archivo") $oFile.focus ControlSend($hwnd, "", "Internet Explorer_Server1", $File) Sleep(750) _IEFormImageClick($oForm, "/images/en_boton-enviar.png", "src") ; How to get the handle/control of that black screen GUI or IE Window ? looking for the handle of the black screen window... and / or how to time when its done Thx 8) Edited March 24, 2009 by Valuater Link to comment Share on other sites More sharing options...
DaleHohm Posted March 24, 2009 Share Posted March 24, 2009 Sorry Val, can you be more specific about what you are trying to get? Every time I try your sample code I get: 0 bytes size received / Se ha recibido un archivo vacio Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
exodius Posted March 24, 2009 Share Posted March 24, 2009 (edited) Sorry Val, can you be more specific about what you are trying to get? Every time I try your sample code I get:0 bytes size received / Se ha recibido un archivo vacioDaleI get that too, but if I manually plug in the same filename (using the site's browse button) then it takes it and runs with it...So is it not even acknowledging his input as valid in the first place even though he's using controlsend? Edited March 24, 2009 by exodius Link to comment Share on other sites More sharing options...
Valuater Posted March 24, 2009 Author Share Posted March 24, 2009 (edited) Dale the full code is available to MVP's This was a cut-out from that, I used pixelgetcolor in the original, however it has to be active to use it and i use this 1 to 3 times a day 8) EDIT: TESTED AGAIN.... OK FOR ME I have no problems with this.. #include <IE.au3> $File = FileOpenDialog("VirusTotal", @DesktopDir, "All (*.*)" ) $oIE = _IECreate("http://www.virustotal.com") $hwnd = _IEPropertyGet($oIE, "hwnd") $oForm = _IEFormGetCollection($oIE, 0) $oFile = _IEGetObjByName($oForm, "archivo") $oFile.focus ControlSend($hwnd, "", "Internet Explorer_Server1", $File) Sleep(750) _IEFormImageClick($oForm, "/images/en_boton-enviar.png", "src") ; How to get the handle/control of that black screen GUI or IE Window ? thx 8) Edited March 24, 2009 by Valuater Link to comment Share on other sites More sharing options...
Authenticity Posted March 24, 2009 Share Posted March 24, 2009 (edited) Regarding the black screen, I think this is possible:While IsObj(_IEGetObjById($oIE, 'opaco') ; a DIV element, may not be considered object? Sleep(20) WEndAbout the scan I think it's somehow possible to loop until the span is inlined:<span id="status_terminado" style="display: none;">finished</span>If it's "display: inline" then it's the state.Edit: or maybe until this style: inline; becomes style: none; (it's the animation progress bar):<div id="status_cargador" style="display: inline;"><img width="220" height="19" border="0" alt="" src="/img/loader.gif"/></div> Edited March 24, 2009 by Authenticity Link to comment Share on other sites More sharing options...
Valuater Posted March 24, 2009 Author Share Posted March 24, 2009 Regarding the black screen, I think this is possible: While IsObj(_IEGetObjById($oIE, 'opaco') ; a DIV element, may not be considered object? Sleep(20) WEnd About the scan I think it's somehow possible to loop until the span is inlined: <span id="status_terminado" style="display: none;">finished</span> If it's "display: inline" then it's the state. Very good Authenticity.. That is what I originally had with some help from dale However, test this... upload the same file twice and it does not work. Tha'ts why I need to know when this "black" window is done... and not pixel use either. I want to use this in-active thx 8) Link to comment Share on other sites More sharing options...
Valuater Posted March 24, 2009 Author Share Posted March 24, 2009 (edited) I think that will work Authenticity While IsObj(_IEGetObjById($oIE, 'opaco') ; a DIV element, may not be considered object? Sleep(20) WEnd Sorry for the rush to condemn... lol 8) EDIT: I thought it worked.. but, It would not let the script continue, it stayed in the loop! thx Edited March 24, 2009 by Valuater Link to comment Share on other sites More sharing options...
Authenticity Posted March 24, 2009 Share Posted March 24, 2009 Hmm, uploading the same file involve with a new page stating this file has already been analyzed so I think the first thing before check the style: inline; stuff is to check it IE is on this page. Link to comment Share on other sites More sharing options...
Valuater Posted March 24, 2009 Author Share Posted March 24, 2009 Hmm, uploading the same file involve with a new page stating this file has already been analyzed so I think the first thing before check the style: inline; stuff is to check it IE is on this page.Not a problem, that part is already done. it's just the black foreground that is a problem.Remember, I have this working... just using pixel get color on that black screenThx8) Link to comment Share on other sites More sharing options...
Authenticity Posted March 24, 2009 Share Posted March 24, 2009 #include <IE.au3> $sFile = @ScriptDir & '\Test.au3' $oIE = _IECreate("http://www.virustotal.com") $hwnd = _IEPropertyGet($oIE, "hwnd") $oForm = _IEFormGetCollection($oIE, 0) $oFile = _IEGetObjByName($oForm, "archivo") $oFile.focus ClipPut($sFile) ControlSend($hwnd, "", "Internet Explorer_Server1", '^v') Sleep(750) _IEFormImageClick($oForm, "/images/en_boton-enviar.png", "src", 0, 0) ConsoleWrite('1' & @LF) While 1 Sleep(200) $oSpan = _IEGetObjById($oIE, 'status_terminado') If $oSpan <> 0 Then ExitLoop WEnd Sleep(1000) ConsoleWrite('2' & @LF) While $oSpan.style.display <> "inline" ; Or $oSpen.style.display = 'none' ;] Sleep(200) WEnd ConsoleWrite('3' & @LF) Link to comment Share on other sites More sharing options...
DaleHohm Posted March 24, 2009 Share Posted March 24, 2009 (edited) Similar to Authenticity 's suggestion, this worked for me: While IsObj(_IEGetObjById($oIE, "envio")) ConsoleWrite(".") Sleep(500) Wend It produced this both on a new file and one that had already been analyzed: ...........................................--> IE.au3 V2.4-0 Warning from function _IEGetObjById, $_IEStatus_NoMatch (envio) (the loop exited after the warning -- you can suppress the warning with _IEErrorNotify) Dale Edited March 24, 2009 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Valuater Posted March 24, 2009 Author Share Posted March 24, 2009 (edited) Testing... Testing.... Thx Guys! 8) EDIT: They both work thx... and thanks for the info on _IEErrorNotify Edited March 24, 2009 by Valuater Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now