Sign in to follow this  
Followers 0
mesale0077

Disable flash Context Menu

2 posts in this topic

hi

swf right click to block

Disable flash Context Menu

#include <GUIConstantsEx.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
HotKeySet('{ESC}', '_Close')



Local $contextmenu, $button, $buttoncontext, $buttonitem, $msg, $iFlag = 0
Local $newsubmenu, $textitem, $fileitem, $saveitem, $infoitem
Global $hGUI, $FlashCtrl
Global $oFlash
Global $fError = False

$hGUI = GUICreate('Test', 550, 400)

$swfObj = ObjCreate("ShockwaveFlash.ShockwaveFlash")
$swfActiveX = GUICtrlCreateObj( $swfObj,-10,20,700,550)
$swfObjEvents = ObjEvent($swfObj,"_fscommand")
    
;right click to block on flash 
GUIRegisterMsg($WM_CONTEXTMENU, "_WM_CONTEXTMENU")
With $swfObj
    ; Put the file string here.
    .Movie = @ScriptDir & '\444gb.swf'
    .wmode = "opaque"
    .menu= False
    .allowScriptAccess = "Always"
    .Playing = True
    
EndWith

GUISetState()

While 1
    Sleep(10)
WEnd

Func _Close()
 
    GUIDelete()
    Exit
EndFunc

Func _fscommand()
    
$buttoncontext = GUICtrlCreateContextMenu($swfObj )
$buttonitem = GUICtrlCreateMenuItem("About autoit", $buttoncontext)
    
    ;$fError = True
EndFunc

Func _WM_CONTEXTMENU($hwnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    If $iFlag Then Return 0
    Return $GUI_RUNDEFMSG
EndFunc

thank you now

Share this post


Link to post
Share on other sites



What's the question?

(If this is an example script, you've posted it in the wrong forum section.)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0