Jump to content

SOLVED:Listview duble click then read and go!!!


jacq
 Share

Recommended Posts

Welcome.

How do I connect this code to work.

$DowbleClicked   = False

GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

$ListViewID = GuiCtrlCreateListView("List Column", 10, 20, 380, 250)
    $Tv1 = GuiCtrlCreateListViewItem("Tvn HD ", $ListViewID)
    $Tv2 = GuiCtrlCreateListViewItem("Polsat HD ", $ListViewID)

GUISetState()




Func DowbleClickFunc()
    MsgBox(64, "OK", "Dowble Clicked: " & GUICtrlRead(GUICtrlRead($ListViewID)))


Switch GUICtrlRead($ListViewID)
   Case "Tvn HD"
    $source1 = '<div id="player_video"><object id="player_object" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab" width="682" height="448" wmode="transparent" style="border-width:; margin-left: -10px; margin-top: -16px"><param name="movie" value="http://static2.weeb.tv/player.swf"><param name="flashvars" value="&amp;cid=3"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="true"><param name="quality" value="high"><param name="bgcolor" value="#000000"><param name="wmode" value="transparent"><embed name="player_embed" type="application/x-shockwave-flash" src="http://static2.weeb.tv/player.swf" flashvars="&amp;cid=3" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#000000" pluginspage="http://get.adobe.com/flashplayer/" width="550" height="390" wmode="transparent"><noembed>&lt;div class="notification error"&gt;Do oglądania wymagana jest darmowa wtyczka Adobe Flash Player. &lt;a href="http://get.adobe.com/flashplayer/"&gt;Pobierz i zainstaluj.&lt;/a&gt;&lt;/div&gt;</noembed></object></div>'


   Case "Polsat HD"
    $source1 = '<div id="player_video"><object id="player_object" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab" width="682" height="448" wmode="transparent" style="border-width:; margin-left: -10px; margin-top: -16px"><param name="movie" value="http://static2.weeb.tv/player.swf"><param name="flashvars" value="&amp;cid=1"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="true"><param name="quality" value="high"><param name="bgcolor" value="#000000"><param name="wmode" value="transparent"><embed name="player_embed" type="application/x-shockwave-flash" src="http://static2.weeb.tv/player.swf" flashvars="&amp;cid=1" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#000000" pluginspage="http://get.adobe.com/flashplayer/" width="550" height="390" wmode="transparent"><noembed>&lt;div class="notification error"&gt;Do oglądania wymagana jest darmowa wtyczka Adobe Flash Player. &lt;a href="http://get.adobe.com/flashplayer/"&gt;Pobierz i zainstaluj.&lt;/a&gt;&lt;/div&gt;</noembed></object></div>'



   Case $Menu_wyjscie
    Exit
  EndSwitch


GUICtrlSetState($Object1, $GUI_HIDE)

$url = $source1  

  _IENavigate($oie,"about:blank",1)
_IEBodyWriteHTML($oie,$url)
$oie.document.body.scroll = "no"
  Sleep(2000)
  GUICtrlSetState($Object1, $GUI_SHOW)
EndFunc







Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam)
    Local $tagNMHDR, $event, $hwndFrom, $code
    $tagNMHDR = DllStructCreate("int;int;int", $lParam)
    If @error Then Return 0
    $code = DllStructGetData($tagNMHDR, 3)
    If $wParam = $ListViewID And $code = -3 Then $DowbleClicked = True
    Return $GUI_RUNDEFMSG
EndFunc
Edited by jacq
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...