Search the Community
Showing results for tags 'droplist'.
-
hey everyone i just need some help with my droplist, i want the items to open up a certain webpage when the user clicks on it, here is my code so far ; AutoIt 3.0.103 example ; 17 Jan 2005 - CyberSlug ; This script shows manual positioning of all controls; ; there are much better methods of positioning... #include <GuiConstantsEx.au3> #include <guiconstants.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> ; GUI #region - gui create $gui= guicreate('microstems internet console',800,200) winsetontop($gui, "",1) #endregion ; PIC GuiCtrlCreatePic("logo4.gif",0,0, 800,200) GuiCtrlSetColor(-1,0xffffff) dropmenu() Func dropmenu() Local $defaultstatus = "Ready", $status, $filemenu, $fileitem Local $helpmenu, $saveitem, $infoitem, $exititem, $recentfilesmenu Local $separator1, $viewmenu, $viewstatusitem, $okbutton, $cancelbutton Local $statuslabel, $msg, $file $filemenu = GUICtrlCreateMenu("&file") $webmenu = guictrlcreatemenu("µsystems web menu") $menuitem = guictrlcreatemenuitem("microsystems station headquarters", $webmenu) $menuitem = guictrlcreatemenuitem("microsystems music fanpages", $webmenu) $menuitem = guictrlcreatemenuitem("runescape.com", $webmenu) $socialnetworks = guictrlcreatemenu("&social networks") $menuitem = guictrlcreatemenuitem("facebook.com", $socialnetworks) $menuitem = guictrlcreatemenuitem("myspace.com", $socialnetworks) $menuitem = guictrlcreatemenuitem("youtube.com", $socialnetworks) $menuitem = guictrlcreatemenuitem("twitter.com", $socialnetworks) $music = guictrlcreatemenu("microsystems music fanpages") $menuitem = guictrlcreatemenuitem("three six mafia", $music) $menuitem = guictrlcreatemenuitem("eminem", $music) $menuitem = guictrlcreatemenuitem("lil joe", $music) $menuitem = guictrlcreatemenuitem("o-dubb", $music) $menuitem = guictrlcreatemenuitem("rick ross", $music) $games = guictrlcreatemenu("&games") $menuitem = guictrlcreatemenuitem("runescape", $games) $menuitem = guictrlcreatemenuitem("knights online", $games) $menuitem = guictrlcreatemenuitem("world of warcraft", $games) $menuitem = guictrlcreatemenuitem("project torque", $games) $fileitem = GUICtrlCreateMenuItem("open", $filemenu) GUICtrlSetState(-1, $GUI_DEFBUTTON) $saveitem = GUICtrlCreateMenuItem("save", $filemenu) GUICtrlSetState(-1, $GUI_DISABLE) $exititem = GUICtrlCreateMenuItem("exit", $filemenu) $recentfilesmenu = GUICtrlCreateMenu("recent Files", $filemenu, 1) GUICtrlSetState(-1, $GUI_CHECKED) $okbutton = GUICtrlCreateButton("ok", 1000, 150, 70, 20) GUICtrlSetState(-1, $GUI_FOCUS) $cancelbutton = GUICtrlCreateButton("cancel", 1000, 150, 70, 20) $separator1 = GUICtrlCreateMenuItem("", $filemenu, 2) ; create a separator line $viewmenu = GUICtrlCreateMenu("view", -1, 1) ; is created before "?" menu $viewstatusitem = GUICtrlCreateMenuItem("Statusbar", $viewmenu) $statuslabel = GUICtrlCreateLabel($defaultstatus, 0, 165, 300, 16, BitOR($SS_SIMPLE, $SS_SUNKEN)) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $fileitem Then $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)") If @error <> 1 Then GUICtrlCreateMenuItem($file, $recentfilesmenu) EndIf If $msg = $viewstatusitem Then If BitAND(GUICtrlRead($viewstatusitem), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($viewstatusitem, $GUI_UNCHECKED) GUICtrlSetState($statuslabel, $GUI_HIDE) Else GUICtrlSetState($viewstatusitem, $GUI_CHECKED) GUICtrlSetState($statuslabel, $GUI_SHOW) EndIf EndIf WEnd GUIDelete() EndFunc ;==>Example ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd so if someone clicks on runescape it'll open up firefox or chrome and go to runescape.com or if they click on facebook it'll go to facebook.com and can u help me make it to where it searches if the user has chrome and where it is located and open the right file and check if the user has chrome and if they don't then open firefox instead. thanks if anyone could help