Jump to content

sasdad

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by sasdad

  1. _FileWriteToLine always returns @error 5 because True = 1 and False = 0 for $bOverWrite parameter. Func _FileWriteToLine($sFilePath, $iLine, $sText, $bOverWrite = False) ... ... If Not IsBool($bOverWrite) Or $bOverWrite = 0 Or $bOverWrite = 1 Then Return SetError(5, 0, 0) ; For old versions.
  2. Eureka! I made it. Everything that needs to be done is register dll file shdocvw.dll In command line run this command: regsvr32.exe shdocvw.dll
  3. But who knows It's so general error. It can be anything.
  4. Hi, I'm trying to user browser events features, but with half success. The code below works (source from help) on one of my computers, but on second I'm getting error 80004002. Does anyone know how to solve it? I have looked for help on some other pages, but nothing seems to work. Maybe some libraries are wrongly registered. I need some ideas. Thank you ; Example script, showing the usage of COM Event functions. ; Requires at least AutoIt beta version 3.1.1.104 ! ; ; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp ; We use a very simple GUI to show the results of our Events. #include "GUIConstants.au3" $GUIMain=GUICreate ( "Event Test", 600,500 ) $GUIEdit=GUICtrlCreateEdit ( "Test Log:" & @CRLF, 10, 20, 580, 400) $GUIProg=GUICtrlCreateProgress ( 10, 5, 580, 10) $GUIExit=GUICtrlCreateButton ( " Close ", 250, 450, 80, 30) GUISetState () ;Show GUI ; We prepare the Internet Explorer as our test subject $oIE=ObjCreate("InternetExplorer.Application.1") With $oIE .Visible=1 .Top = (@DesktopHeight-400)/2 .Height=400 ; Make it a bit smaller than our GUI. .Width=600 .Silent=1 ; Don't show IE's dialog boxes $IEWnd=HWnd(.hWnd); Remember the Window, in case user decides to close it EndWith ; We choose for a specific Internet Explorer interface 'DWebBrowserEvents' because the IE is subject ; to modifications by e.g. Visual Studio and Adobe Acrobat Reader. If you have IE-plugins installed, ; AutoIt might not be able to find the correct interface automatically. $EventObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvents") if @error then Msgbox(0,"AutoIt COM Test", _ "ObjEvent: Can't use event interface 'DWebBrowserEvents'. Error code: " & hex(@error,8)) exit endif ; Now starting to load an example Web page. $URL = "http://www.AutoItScript.com/" $oIE.Navigate( $URL ) sleep(1000) ; Give it some time to load the web page GUISwitch ( $GUIMain ); Switch back to our GUI in case IE stealed the focus ; Waiting for user to close the GUI. While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE or $msg = $GUIExit Then ExitLoop Wend $EventObject.Stop ; Tell IE we don't want to receive events. $EventObject=0 ; Kill the Event Object If WinExists($IEWnd) then $oIE.Quit; Close IE Window $oIE=0 ; Remove IE from memory (not really necessary). GUIDelete () ; Remove GUI exit ; End of our Demo. ; A few Internet Explorer Event Functions ; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/webbrowser.asp Func IEEvent_BeforeNavigate($URL, $Flags, $TargetFrameName, $PostData, $Headers, $Cancel) ; Note: the declaration is different from the one on MSDN. GUICtrlSetData ( $GUIEdit, "BeforeNavigate: " & $URL & " Flags: " & $Flags & " tgframe: " & $TargetFrameName & " Postdat: " & $PostData & " Hdrs: " & $Headers & " canc: " & $Cancel & @CRLF , "append" ) EndFunc Func IEEvent_ProgressChange($Progress,$ProgressMax) If $ProgressMax > 0 Then GUICtrlSetData($GUIProg, ($Progress * 100) / $ProgressMax ) EndIf EndFunc Func IEEvent_StatusTextChange($Text) GUICtrlSetData ( $GUIEdit, "IE Status text changed to: " & $Text & @CRLF , "append" ) EndFunc Func IEEvent_PropertyChange( $szProperty) GUICtrlSetData ( $GUIEdit, "IE Changed the value of the property: " & $szProperty & @CRLF , "append" ) EndFunc Func IEEvent_DownloadComplete() GUICtrlSetData ( $GUIEdit, "IE has finished a navigation operation" & @CRLF , "append" ) EndFunc Func IEEvent_NavigateComplete($URL) ; Note: the declaration is different from the one on MSDN. GUICtrlSetData ( $GUIEdit, "IE has finished loading URL: " & $URL & @CRLF , "append" ) EndFunc Func IEEvent_($EventName) ; This is an optional event function to catch non-defined events. ; The parameter contains the name of the event being called. GUICtrlSetData ( $GUIEdit, "Uncatched event: " & $EventName & @CRLF , "append" ) EndFunc
  5. OK, that's no problem. I just wanted to know, how difficult is to crack this encryption. If it's a work for days or hours.
  6. Hi great work, I have some questions? How safe is this plugin? Is it OK, that for example test "hi" is everytime encrypted as the same string? And second question. Why took so ong to generate any key bigger then 128bit. I have generated 256bit key (approximately 10 minutes - processor E6300) And I'm trying to generate 512bit key. Thank you
  7. Maybe I can live with this, but it's not clean and then I can't use ENTER, but I have more complicated form, where need to choose item from Combo. I know I can choose it without ENTER but you know ....
  8. Hi, I'm having problem with setting default button. I'm writing you because the problem is similar to ones that you have answered. Everything works fine, but when I press key ENTER it doesn't do the function BUTTON. When I comment line $GUIActiveX = GUICtrlCreateObj($IE, 0, 0, 680, 510) then the button when I press ENTER works fine. But I need this line What is interesting is that when I comment lines $Input = GuiCtrlCreateInput("", 60, 40, 85, -1, $ES_PASSWORD) and "GUICtrlSetState($Input,$GUI_FOCUS) then the button on pressing ENTER key works only one time and then the ENTER is like death. Do you know how to fix it or where is the problem. IE.au3 file can be downloaded from pages IE.au3 Library Homepage or direct link for this file is IE.au3 Library Thank you very much for you help I'm using the latest beta version build 126 #include <GuiConstants.au3> #include <IE.au3> Opt("GUIOnEventMode", 1) $IE = _IECreateEmbedded () $GUI = GUICreate("Title", 680, 510, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_DISABLED) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE") $GUIActiveX = GUICtrlCreateObj($IE, 0, 0, 680, 510); <----- This line $GUI1 = GUICreate("Title", 170, 100, -1, -1, $WS_OVERLAPPED + $WS_CAPTION + $WS_VISIBLE + $WS_SYSMENU) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE") $Label = GuiCtrlCreateLabel("Pass:", 25, 43) $Input = GuiCtrlCreateInput("", 60, 40, 85, -1, $ES_PASSWORD) GUICtrlSetState($Input,$GUI_FOCUS) $Button = GuiCtrlCreateButton("OK", 45, 70, 80) GUICtrlSetOnEvent($Button, "BUTTON") GUICtrlSetState($Button,$GUI_DEFBUTTON) While 1 Sleep(1000) WEnd Func BUTTON() MsgBox(0,"Working","Working") EndFunc Func CLOSE() Exit EndFunc
  9. And also thank you for fast answer.
  10. After reading source I made the same change and It worked. It was small mistake But I will not use it, till updated official beta version. I can use overwrite.
  11. Hi, I think that there is an error in _FileWriteToLine function. I made a file c:\test.txt with 10 lines _FileWriteToLine("c:\test.txt", 3, "my replacement for line 3", 1) works great _FileWriteToLine("c:\test.txt", 3, "my insertion", 0) doesn't work Can you please fix it? Thank you
×
×
  • Create New...