Jump to content

EKY32

Active Members
  • Posts

    294
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by EKY32

  1. I always like simplicity. I don't trust any non-autoit softwares especialy for sensitive commands like protecting resources of an au3 compiled script. I saw many examples in the forum but all where useless for me.
  2. Hey there, i'm trying to protect my compiled script resource data, I have an HTML file (and other important files) which i need to protect from being extracted using ResHacker or PE Explorer or whatever, does Obfuscator help me doing that?
  3. Fixed: $oIE.document.body.style.background = "black" $oIE.document.body.style.color = "white" Thanks anyway.
  4. Hey there, I know this is HTML codes related, but i need to ask. I have a normal black text in an embedded white IE frame, i just need to help the user invert the colors without refreshing the page. Can you lead me to a simple way please
  5. Fixed, in the help file: _IECreateEmbedded()
  6. thank you, but _IEAction($oIE, "refresh") ruins the _ComFrameHide($oIE) function.
  7. Hey friends, in my simple script the IE frame never appears until i resize the window, and disappears after minimizing untill i do the same. i think i should refresh the window i don't know how. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister() Local $oIE = _IECreateEmbedded() $Form1 = GUICreate("Form1", 898, 587, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_TABSTOP)) GUICtrlCreatePic("bg.bmp", 0, 0, 898, 32) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKHEIGHT) $Pic1 = GUICtrlCreateObj($oIE, 0, 32, 897, 555) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM) _IENavigate($oIE, @ScriptDir & "\doc.html") _ComFrameHide($oIE) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _ComFrameHide($Frame) $Frame.document.body.scroll = "no" $Frame.document.body.style.borderwidth = 0 $Frame.document.body.topmargin = 10 $Frame.document.body.leftmargin = 10 EndFunc ;==>_ComFrameHide thank you.
  8. Hey wakillon, I was trying to apply the water effect on a resizable picture control in my GUI, i had a problem of course as the bmp is not create as a known control to me. The control name is: [CLASS:#32770; INSTANCE:1] can i change the size of it? my Pic Control is resized as the window width. thank you.
  9. thank you, but it's soo far than a Ribbon.
  10. Any help of any kind please about customizing gui theme or creating controls like the above?
  11. Hey there, i'm using Win 7 and this window's menu seems to be themed as Win 8 style how is that? and how to create exactly such toolbar with search bar in it? thank you.
  12. Hey grabb, please try reviewing _IEHeadInsertEventScript in the help file.
  13. I'm sorry i'm not sure i understood you, i can comment it out but it's just returning that the 2 lines are not for objects. $oMediaControl.Stop() $oGraphBuilder.Release() ! COM Error ! Number: 0x00000000 ScriptLine: 110 - Variable must be of type 'Object'. ! COM Error ! Number: 0x00000000 ScriptLine: 113 - Variable must be of type 'Object'. forgive me.
  14. thank you very much, i'm still getting errors in the console with: $oMediaControl.Stop() $oGraphBuilder.Release() should i replace them?
  15. I'm sorry i had to get back because your script mr.trancexx returns a "failed to stream" error while it's working successfully with the radio stations up there.. so i cant give the user the ability to know that streaming is really failed. #include <AutoitObject.au3> Opt("MustDeclareVars", 1) Global $oGraphBuilder, $oMediaControl, $oBasicAudio, $oAudioMeterInformation, $hLevMet, $iPlaying = 1, $iVol Global $sMediaFile = "http://music.nextweb.ru:9500/kavkaz-fm" Global $oCOMError = ObjEvent("AutoIt.Error", "_ErrFunc") _AutoItObject_StartUp() Global $oUSER32DLL = _AutoItObject_DllOpen("user32.dll") Global $hGUI = GUICreate("tinyAdiga Live Streaming", 278, 80) Global $hButtonPlay = GUICtrlCreateButton("&Pause", 80, 20, 115, 25) Global $hLabelInfo = GUICtrlCreateLabel(" ...Connecting...", 90, 60, 130, 25) GUISetState() While 1 Switch GUIGetMsg() Case -3 ExitLoop Case $hButtonPlay If $iPlaying Then $oMediaControl.Pause() GUICtrlSetData($hButtonPlay, "&Play") $iPlaying = 0 Else $oMediaControl.Run() GUICtrlSetData($hButtonPlay, "&Pause") $iPlaying = 1 EndIf EndSwitch If $sMediaFile Then _RenderFile($sMediaFile) WEnd _Quit() Func _Quit() _ReleaseBuilder($oGraphBuilder, $oMediaControl, $oBasicAudio) $oAudioMeterInformation = 0 Exit EndFunc ;==>_Quit Func _InitBuilder(ByRef $oGraphBuilder, ByRef $oMediaControl, ByRef $oBasicAudio) ; Needed identifiera Local $sCLSID_FilterGraph = "{E436EBB3-524F-11CE-9F53-0020AF0BA770}" Local $sIID_IGraphBuilder = "{56A868A9-0AD4-11CE-B03A-0020AF0BA770}" ; More... Local $tIID_IMediaControl = _AutoItObject_CLSIDFromString("{56A868B1-0AD4-11CE-B03A-0020AF0BA770}") Local $tIID_IBasicAudio = _AutoItObject_CLSIDFromString("{56A868B3-0AD4-11CE-B03A-0020AF0BA770}") ; Define IGraphBuilder methods Local $dtagIGraphBuilder = $dtagIUnknown & _ "AddFilter hresult(ptr;wstr);" & _ "RemoveFilter hresult(ptr);" & _ "EnumFilters hresult(ptr*);" & _ "FindFilterByName hresult(wstr;ptr*);" & _ "ConnectDirect hresult(ptr;ptr;ptr);" & _ "Reconnect hresult(ptr);" & _ "Disconnect hresult(ptr);" & _ "SetDefaultSyncSource hresult();" & _ ; IFilterGraph "Connect hresult(ptr;ptr);" & _ "Render hresult(ptr);" & _ "RenderFile hresult(wstr;ptr);" & _ "AddSourceFilter hresult(wstr;wstr;ptr*);" & _ "SetLogFile hresult(dword_ptr);" & _ "Abort hresult();" & _ "ShouldOperationContinue hresult();" ; IGraphBuilder ; Wrapp IGraphBuilder interface $oGraphBuilder = _AutoItObject_ObjCreate($sCLSID_FilterGraph, $sIID_IGraphBuilder, $dtagIGraphBuilder) If @error Then Return SetError(1, 0, False) ; IMediaControl IDispatch Local $aCall = $oGraphBuilder.QueryInterface(Number(DllStructGetPtr($tIID_IMediaControl)), 0) If IsArray($aCall) And $aCall[2] Then $oMediaControl = _AutoItObject_PtrToIDispatch($aCall[2]) Else Return SetError(2, 0, False) EndIf Local $pBasicAudio ; Get pointer to IBasicAudio interface $aCall = $oGraphBuilder.QueryInterface(Number(DllStructGetPtr($tIID_IBasicAudio)), 0) If IsArray($aCall) And $aCall[2] Then $pBasicAudio = $aCall[2] Else Return SetError(3, 0, False) EndIf ; IBasicAudio is dual interface. Defining vTable methods: Local $dtagIBasicAudio = $dtagIDispatch & _ "put_Volume hresult(long);" & _ "get_Volume hresult(long*);" & _ "put_Balance hresult(long);" & _ "get_Balance hresult(long*);" ; IBasicAudio ; Wrapp it: $oBasicAudio = _AutoItObject_WrapperCreate($pBasicAudio, $dtagIBasicAudio) If @error Then Return SetError(4, 0, False) Return True ; There EndFunc ;==>_InitBuilder Func _ReleaseBuilder(ByRef $oGraphBuilder, ByRef $oMediaControl, ByRef $oBasicAudio) $oMediaControl.Stop() $oBasicAudio = 0 $oMediaControl = 0 $oGraphBuilder.Release() ;<-! $oGraphBuilder = 0 EndFunc ;==>_ReleaseBuilder Func _RenderFile(ByRef $sMediaFile) _ReleaseBuilder($oGraphBuilder, $oMediaControl, $oBasicAudio) _InitBuilder($oGraphBuilder, $oMediaControl, $oBasicAudio) If Not _WMAsfReaderLoad($sMediaFile) Then $oUSER32DLL.MessageBeep("int", "dword", 48) $sMediaFile = "" Return SetError(1, 0, False) EndIf $oCOMError.number = 0 ; set no-error condition $oMediaControl.Run() ; Check for error If $oCOMError.number Then GUICtrlSetFont($hLabelInfo, 9, -1, 1, "Arial") GUICtrlSetData($hLabelInfo, "Streaming failed") GUICtrlSetColor($hLabelInfo, 0xFF0000) MsgBox(48, "Error", "Failed to stream", 0, $hGUI) Else GUICtrlSetFont($hLabelInfo, 9, -1, 1, "Arial") GUICtrlSetData($hLabelInfo, " Connected!") EndIf $sMediaFile = "" Return True EndFunc ;==>_RenderFile Func _WMAsfReaderLoad($sFile) Local Const $sCLSID_WMAsfReader = "{187463A0-5BB7-11d3-ACBE-0080C75E246E}" ; IBaseFilter definition Local Const $sIID_IBaseFilter = "{56a86895-0ad4-11ce-b03a-0020af0ba770}" Local $dtagIBaseFilter = $dtagIUnknown & _ "GetClassID hresult(ptr*);" & _; IPersist "Stop hresult();" & _ "Pause hresult();" & _ "Run hresult(int64);" & _ "GetState hresult(dword;dword*);" & _ "SetSyncSource hresult(ptr);" & _ "GetSyncSource hresult(ptr*);" & _ ; IMediaFilter "EnumPins hresult(ptr*);" & _ "FindPin hresult(wstr;ptr*);" & _ "QueryFilterInfo hresult(ptr*);" & _ "JoinFilterGraph hresult(ptr;wstr);" & _ "QueryVendorInfo hresult(wstr*);" ; IBaseFilter ; Create object Local $oBaseFilter = _AutoItObject_ObjCreate($sCLSID_WMAsfReader, $sIID_IBaseFilter, $dtagIBaseFilter) If @error Then Return SetError(1, 0, False) ; AddFilter is "must" to be able to use it $oGraphBuilder.AddFilter($oBaseFilter.__ptr__, "anything") ; File will be loaded using FileSourceFilter object ; IFileSourceFilter definition Local Const $sIID_IFileSourceFilter = "{56a868a6-0ad4-11ce-b03a-0020af0ba770}" Local $dtagIFileSourceFilter = $dtagIUnknown & _ "Load hresult(wstr;ptr);" & _ "GetCurFile hresult(ptr*;ptr);" Local $tIID_IFileSourceFilter = _AutoItObject_CLSIDFromString($sIID_IFileSourceFilter) ; Ask for FileSourceFilter object from BaseFilter Local $aCall = $oBaseFilter.QueryInterface(Number(DllStructGetPtr($tIID_IFileSourceFilter)), 0) If Not IsArray($aCall) Then Return SetError(2, 0, False) ; Wrapp it Local $oFileSourceFilter = _AutoItObject_WrapperCreate($aCall[2], $dtagIFileSourceFilter) ; Load the file now $oFileSourceFilter.Load($sFile, 0) $aCall = $oFileSourceFilter.GetCurFile(0, 0) Local $pFile = $aCall[1] Local $sLoaded = DllStructGetData(DllStructCreate("wchar[" & __Au3Obj_PtrStringLen($pFile) + 1 & "]", $pFile), 1) __Au3Obj_CoTaskMemFree($pFile) ConsoleWrite($sLoaded & @CRLF) ; Get pointer to EnumPins object $aCall = $oBaseFilter.EnumPins(0) If Not IsArray($aCall) Or Not $aCall[1] Then Return SetError(3, 0, False) Local $pEnum = $aCall[1] ; Define IEnumPins methods Local $dtagIEnumPins = $dtagIUnknown & _ "Next hresult(dword;ptr*;dword*);" & _ "Skip hresult(dword);" & _ "Reset hresult();" & _ "Clone hresult(ptr*);" ; Wrapp it Local $oEnum = _AutoItObject_WrapperCreate($pEnum, $dtagIEnumPins) ; Will enumerate all PINs and render them Local $pPin While 1 $aCall = $oEnum.Next(1, 0, 0) If Not IsArray($aCall) Then Return SetError(4, 0, False) $pPin = $aCall[2] If $pPin Then $oGraphBuilder.Render($pPin) _AutoItObject_IUnknownRelease($pPin); releasing non-wrapped object when no longer needed EndIf If $aCall[0] Then ExitLoop WEnd ; All's ok Return True EndFunc ;==>_WMAsfReaderLoad Func _ErrFunc() ConsoleWrite("! COM Error ! Number: 0x" & Hex($oCOMError.number, 8) & " ScriptLine: " & $oCOMError.scriptline & " - " & $oCOMError.windescription & @CRLF) EndFunc ;==>_ErrFunc thanks.
  16. Nice script by trancexx : I love you man thank you.
  17. thank you i made a deep search and saw some examples I liked the one using bass.dll coz i'ts the only one that worked for me. anyway i'll see your script thank you.
  18. Hey there, I'm trying to load a radio stream to my app from this station: Кавказ ФМ the source code of the webpage using that swf player led me to the main streamer website: http://music.nextweb.ru:9500 for example when you navigate to this channel http://music.nextweb.ru:9500/adigeiskaya using Firefox it loads the radio streaming in a built-in player, and with IExplorer it notifies to save an mp3 file with 310MB of size named adigeiskaya.mp3 so it is the streaming file that i want to load to my app. how can i read a remote mp3 file without downloading it locally? thank you.
  19. hey friends, I have a web page loaded to an embedded browser in a GUI, I was thinking if there is a way that AutoIt can get notified when a jscript function returns: Simple code for fast test: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = ObjCreate("Shell.Explorer.2") GUICreate("JS + AU3", 500, 200) GUICtrlCreateObj($oIE, 10, 40, 400, 100) GUISetState() $oIE.navigate(@ScriptDir & "\jsau3.html") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func Command() MsgBox(0,"","Hi From AU3") EndFunc Simple HTML file with jScript functions: (jsau3.html) <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Untitled 1</title> <script>function Browser() {alert("Hi From JS")};</script> <script>function AutoIt() {//Send Command To AutoIt};</script> </head> <body> <form method="post"> <input name="Button1" type="button" value="Send JS MsgBox To Browser" onclick="Browser()" /> <br/> <input name="Button2" type="button" value="Send Command To AutoIt" onclick="AutoIt()" /></form> </body> </html> Button2 should notify AutoIt to run Function "Command()" if this is possible somehow. thank you.
  20. I copied the text of your HTML file you posted up there to my file, and tried to read it with the code i posted up there, and it worked fine. if you still have a problem post your code here, or the full HTML content if you have other than what you posted.
  21. NO no! it's not what I mean! you are welcomed any time.
  22. More help, according to (5 posts) and Anti - Double - Open #include <Misc.au3> #include <MsgBoxConstants.au3> If _Singleton("test", 1) = 0 Then MsgBox($MB_SYSTEMMODAL, "Warning", "An occurence of test is already running") Exit EndIf MsgBox($MB_SYSTEMMODAL, "OK", "the first occurence of test is running") good luck
  23. I tried it and it's working: #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate(@ScriptDir & "\h.html") Local $sHTML = _IEDocReadHTML($oIE) MsgBox($MB_SYSTEMMODAL, "Document Source", $sHTML) _IEQuit($oIE) post your code if you thing there is something wrong?
  24. Hey friends, can I get some help using replacing _GDIPlus_PathAddString to create a PNG file instead of a text to use _GDIPlus_PathIsVisiblePoint ? GDI+ is really going me death.
×
×
  • Create New...