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



#2 ·  Posted (edited)

Line 27:

With $swfObj

==> Only Object-type variables allowed in a "With" statement.

Edited by Maffe811

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

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