SoundOfDeath Posted June 16, 2010 Share Posted June 16, 2010 (edited) NEW Problem!Okay, so now I got a new problem, the hyperlinks for the list works currently I got this:expandcollapse popup#include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <ie.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Youtube Navigator", 411, 269, 632, 128) GUISetIcon("D:\005.ico") $PageControl1 = GUICtrlCreateTab(8, 8, 396, 256) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("Youtube Favorites") $List1 = GUICtrlCreateList("", 16, 40, 377, 174) GUICtrlSetData(-1, "::Emnesty:: Time to DIE montage|Ace the Best Combatarms Community Montage by Taylon & Hammudi|Banned xbox 360 Ad|Xbox Mosquito TV Commercial") GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Label1 = GUICtrlCreateLabel("http://www.youtube.com/user/ComplicatedKiller", 88, 232, 235, 18) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlSetColor(-1, 0x0066CC) GUICtrlSetCursor (-1, 0) $TabSheet2 = GUICtrlCreateTabItem("Youtube Uploads") $Label2 = GUICtrlCreateLabel("http://www.youtube.com/user/ComplicatedKiller", 88, 232, 235, 18) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlSetColor(-1, 0x0066CC) GUICtrlSetCursor (-1, 0) $List2 = GUICtrlCreateList("", 16, 40, 377, 174) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $List1 $selected = GUICtrlRead($List1) $selected1 = GUICtrlRead($List1) if $selected = "::Emnesty:: Time to DIE montage" Then _IECreate("http://www.youtube.com/user/ComplicatedKiller#p/a/508A4A7076651750/1/z3i3agcGwyo") ElseIf $selected1 = "Ace the Best Combatarms Community Montage by Taylon & Hammudi" Then _IECreate("http://www.youtube.com/user/ComplicatedKiller#p/a/508A4A7076651750/0/6dxwItemR-M") EndIf EndSwitch If $nMsg = $Label1 Then _IECreate ("http://www.youtube.com/user/ComplicatedKiller", 1, 1, 0) EndIf If $nMsg = $Label2 Then _IECreate ("http://www.youtube.com/user/ComplicatedKiller", 1, 1, 0) EndIf WEndBut when I try to open the page again with clicking on the same item in the list, it doesn't respond, so I can only open the page once, does someone know how to fix this? Edited June 16, 2010 by SoundOfDeath Link to comment Share on other sites More sharing options...
MrMitchell Posted June 16, 2010 Share Posted June 16, 2010 (edited) Select an item in the list and GUICtrlRead($List1) or GUICtrlRead($List2) will return which item in the list is selected. Edit (add): Not sure you'll be able to hyperlink them...need to get creative or leave that for one of the gurus to come up with Edited June 16, 2010 by MrMitchell Link to comment Share on other sites More sharing options...
lordicast Posted June 16, 2010 Share Posted June 16, 2010 (edited) Nevermind give me a sec Edited June 16, 2010 by lordicast [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2010 Share Posted June 16, 2010 You can't make them actual hyperlinks, but you can style them to look like hyperlinks (alternate color blue, underlined) and then handle the event for clicking on it by launching a URL in a browser. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
lordicast Posted June 16, 2010 Share Posted June 16, 2010 Like this expandcollapse popup#include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <ie.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Youtube Navigator", 411, 269, 632, 128) GUISetIcon("D:\005.ico") $PageControl1 = GUICtrlCreateTab(8, 8, 396, 256) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("Youtube Favorites") $List1 = GUICtrlCreateList("", 16, 40, 377, 174) GUICtrlSetData(-1, "::Emnesty:: Time to DIE montage|Ace the Best Combatarms Community Montage by Taylon & Hammudi|Banned xbox 360 Ad|Xbox Mosquito TV Commercial") GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Label1 = GUICtrlCreateLabel("http://www.youtube.com/user/ComplicatedKiller", 88, 232, 235, 18) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlSetColor(-1, 0x0066CC) GUICtrlSetCursor (-1, 0) $TabSheet2 = GUICtrlCreateTabItem("Youtube Uploads") $Label2 = GUICtrlCreateLabel("http://www.youtube.com/user/ComplicatedKiller", 88, 232, 235, 18) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlSetColor(-1, 0x0066CC) GUICtrlSetCursor (-1, 0) $List2 = GUICtrlCreateList("", 16, 40, 377, 174) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg case $List1 $selected = GUICtrlRead($List1) if $selected = "::Emnesty:: Time to DIE montage" Then _IECreate("http://youtube.com/myvideo") ElseIf $selected = "Ace the Best Combatarms Community Montage by Taylon & Hammudi" Then _IECreate("http://youtube.com/myvideo");-- And so on EndIf Case $GUI_EVENT_CLOSE Exit EndSwitch If $nMsg = $Label1 Then _IECreate ("http://www.youtube.com/user/ComplicatedKiller", 1, 1, 0) EndIf If $nMsg = $Label2 Then _IECreate ("http://www.youtube.com/user/ComplicatedKiller", 1, 1, 0) EndIf WEnd [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
lordicast Posted June 16, 2010 Share Posted June 16, 2010 ok fixed expandcollapse popup#include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <ie.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Youtube Navigator", 411, 269, 632, 128) GUISetIcon("D:\005.ico") $PageControl1 = GUICtrlCreateTab(8, 8, 396, 256) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("Youtube Favorites") $List1 = GUICtrlCreateList("", 16, 40, 377, 174) GUICtrlSetData(-1, "::Emnesty:: Time to DIE montage|Ace the Best Combatarms Community Montage by Taylon & Hammudi|Banned xbox 360 Ad|Xbox Mosquito TV Commercial") GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Label1 = GUICtrlCreateLabel("http://www.youtube.com/user/ComplicatedKiller", 88, 232, 235, 18) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlSetColor(-1, 0x0066CC) GUICtrlSetCursor(-1, 0) $TabSheet2 = GUICtrlCreateTabItem("Youtube Uploads") $Label2 = GUICtrlCreateLabel("http://www.youtube.com/user/ComplicatedKiller", 88, 232, 235, 18) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlSetColor(-1, 0x0066CC) GUICtrlSetCursor(-1, 0) $List2 = GUICtrlCreateList("", 16, 40, 377, 174) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 sleep(10) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $List1 $selected = GUICtrlRead($List1) If $selected = "::Emnesty:: Time to DIE montage" Then _IECreate("http://www.youtube.com/user/ComplicatedKiller#p/a/508A4A7076651750/1/z3i3agcGwyo",1,1,0,1) ElseIf $selected = "Ace the Best Combatarms Community Montage by Taylon & Hammudi" Then _IECreate("http://www.youtube.com/user/ComplicatedKiller#p/a/508A4A7076651750/0/6dxwItemR-M",1,1,0,1) EndIf Case $Label1 _IECreate("http://www.youtube.com/user/ComplicatedKiller", 1, 1, 0) Case $Label2 _IECreate("http://www.youtube.com/user/ComplicatedKiller", 1, 1, 0) EndSwitch WEnd [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
SoundOfDeath Posted June 16, 2010 Author Share Posted June 16, 2010 Thanks lordicast, could you also help me with my new problem? Link to comment Share on other sites More sharing options...
lordicast Posted June 16, 2010 Share Posted June 16, 2010 Thanks lordicast, could you also help me with my new problem?Thought I did? I fixed the doesnt open after 1 click problem it opens up everytime now check my last post. [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
SoundOfDeath Posted June 16, 2010 Author Share Posted June 16, 2010 Thought I did? I fixed the doesnt open after 1 click problem it opens up everytime now check my last post.Owh i see, it works perfectly now, thanks for you help Link to comment Share on other sites More sharing options...
lordicast Posted June 16, 2010 Share Posted June 16, 2010 Owh i see, it works perfectly now, thanks for you help No problem ... ... .... [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now