BrettF Posted January 30, 2007 Share Posted January 30, 2007 I am trying to get thsis function (in the case section of the GUI to work once and the not to load the page again.) It wont. It ends up loading the page in an infinite loop (well duh! its in while wend tags...) i have tried to use IF $var = 1 then do the function $var = 0 else ;do nothing but it dosnt work. Could someone please help? $Restricted = "www.google.com.au" Case _IEAttach (WinGetTitle ("Ba-Browser"),"URL") = $Restricted IF NOT $times = 1 Then DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetwindow, "str", @ScriptDir & "\Restricted_Page.html") TrayTip ( "Popup", "An attempted load on a restricted site has been performed.", 10,1) $times = 0 IF @error = 7 Then EndIf Else EndIf Why wont it work??? Thanks, Bert. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2007 Moderators Share Posted January 30, 2007 I am trying to get thsis function (in the case section of the GUI to work once and the not to load the page again.) It wont. It ends up loading the page in an infinite loop (well duh! its in while wend tags...) i have tried to use IF $var = 1 then do the function $var = 0 else ;do nothing but it dosnt work. Could someone please help? $Restricted = "www.google.com.au" Case _IEAttach (WinGetTitle ("Ba-Browser"),"URL") = $Restricted IF NOT $times = 1 Then DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetwindow, "str", @ScriptDir & "\Restricted_Page.html") TrayTip ( "Popup", "An attempted load on a restricted site has been performed.", 10,1) $times = 0 IF @error = 7 Then EndIf Else EndIf oÝ÷ ÙhrÂíÜ(®Dájy,êí?ú®¢×ºÚ"µÍQÜH È[If what is at error... TrayTip? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 30, 2007 Share Posted January 30, 2007 IF @error = 7 ThenIf what is at error... TrayTip? Hi, I think it should come from _IEAttach ==> 7 ($_IEStatus_NoMatch) = No Match So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2007 Moderators Share Posted January 30, 2007 Hi,I think it should come from _IEAttach ==> 7 ($_IEStatus_NoMatch) = No MatchSo long,MegaWell then, the @error is even more messed up than I thought...I'm aware of 4 @error returns for DLLCall() and none that I'm aware of for ToolTip(), but I was being facetious about the @error, it was my way of saying... hey, it's not supposed to be there.I'd look up his DllCall() but he didn't provide the link to MSDN to it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
BrettF Posted January 30, 2007 Author Share Posted January 30, 2007 Well then, the @error is even more messed up than I thought...I'm aware of 4 @error returns for DLLCall() and none that I'm aware of for ToolTip(), but I was being facetious about the @error, it was my way of saying... hey, it's not supposed to be there.I'd look up his DllCall() but he didn't provide the link to MSDN to it.Dont worry Guys... I'll have to re-write it anyway. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2007 Moderators Share Posted January 30, 2007 Dont worry Guys... I'll have to re-write it anyway. I see the reason you didn't provide the MSDN link, it uses cwebpage.dll... If the DLL is failing (we don't know because you aren't using error handling for it that I know of), are you sure that the $internetwindow is a hwnd?And having never worked with that DLL personally, from the little bit I've searched on google and here, I don't see anyone using anything for the 'str' parameter but actual links where you are using a file... I don't know if that is correct or not.I'd like to know where some API documentation is for this though if anyone knows. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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