tradertt Posted February 6, 2008 Share Posted February 6, 2008 Hi guys, I have a script that auto enters some data into a web form database. I wish to hide it which is why I used _IECREATE with the option 0 for hidden window. However, sometimes, in order to check the progress, I would like to show the hidden window when I activate some keypresses Is there a easy way to do it? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted February 6, 2008 Share Posted February 6, 2008 (edited) #include <IE.au3> $oIE = _IECreate('',0,0) $oHandle = _IEPropertyGet($oIE,'hwnd') Sleep(3000) WinSetState($oHandle,'',@SW_SHOW) Sleep(3000) WinSetState($oHandle,'',@SW_HIDE) EDIT: Read your post wrong xD Edited February 6, 2008 by Thatsgreat2345 Link to comment Share on other sites More sharing options...
DaleHohm Posted February 6, 2008 Share Posted February 6, 2008 tgreat's method will work, another is using _IEAction($oIE, "visible") and _IEAction($oIE, "invisible") in conjunction with HotKeySet 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...
tradertt Posted February 6, 2008 Author Share Posted February 6, 2008 #RequireAdmin #include<IE.au3> #include<File.au3> #include<GUIConstants.au3> #include<Array.au3> HotKeySet("+!h", "hidewindow") ;Shift-Alt-h HotKeySet("+!s", "showwindow") ;Shift-Alt-s _FileReadToArray($LinkSource,$Links) _IELoadWaitTimeout($Timeout) _IEErrorHandlerRegister() $oIE=_IECreate("about:blank",0,$IEStatus,1,-1) For $o=0 to $Repeat For $i=0 to $Amount MAIN BODY OF CODE Next Func hidewindow() _IEAction($oIE, "visible") EndFunc Func showwindow() _IEAction($oIE, "invisible") EndFunc I am sorry did I do something wrong for Hotkey set. Tried it but it does not seem to hide the window when I pressed Shift Alt h and show it when I pressed Shift Alt s Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
tradertt Posted February 6, 2008 Author Share Posted February 6, 2008 Can anyone help me on how do I use hotkeys, tried following the help file but it did not seem to work. NOthing happens when I pressed the hotkey set Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
Valuater Posted February 6, 2008 Share Posted February 6, 2008 Just for the window ( not your code ) maybe... expandcollapse popup#RequireAdmin #include<IE.au3> #include<File.au3> #include<GUIConstants.au3> #include<Array.au3> HotKeySet("{F8}", "hidewindow") HotKeySet("{F9}", "showwindow") HotKeySet("{ESC}", "_Exit") ;_FileReadToArray($LinkSource,$Links) ;_IELoadWaitTimeout($Timeout) _IEErrorHandlerRegister() $oIE = _IECreate("about:blank");,0,$IEStatus,1,-1) $oHandle = _IEPropertyGet($oIE, 'hwnd') ;'For $o=0 to $Repeat ; For $i=0 to $Amount ; MAIN BODY OF CODE ;Next While WinExists($oHandle) Sleep(20) WEnd Func hidewindow() _IEAction($oIE, "invisible") EndFunc ;==>hidewindow Func showwindow() _IEAction($oIE, "visible") EndFunc ;==>showwindow Func _Exit() $oIE = "" Exit EndFunc ;==>_Exit $oIE = "" Exit 8) Link to comment Share on other sites More sharing options...
tradertt Posted February 7, 2008 Author Share Posted February 7, 2008 Hi Thank you. It works Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted February 7, 2008 Share Posted February 7, 2008 I recommend using my method as occasionally use some IE COM functions cause the script to crash so I try to use some Win* functions just because they are safer. 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