blizzedout Posted June 9, 2005 Posted June 9, 2005 Having a problem with the if statement working with combo box $BROWSER = GUICtrlCreateCombo ('"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"', 17,151,300) $BROWSER2 = GUICtrlSetData(-1,'"C:\Program Files\Internet Explorer\IEXPLORE.EXE"','"C:\Program Files\Mozilla Firefox\firefox.exe"') IF GUICtrlRead($BROWSER2) = '"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"' then Send("^l") ElseIf GUICtrlRead($BROWSER2) = '"C:\Program Files\Internet Explorer\IEXPLORE.EXE"' then Send("F4") EndIF
Valuater Posted June 9, 2005 Posted June 9, 2005 IF GUICtrlRead($BROWSER2) = '"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"' then run("C:\Program Files\Internet Explorer\IEXPLORE.EXE"','"C:\Program Files\Mozilla Firefox\firefox.exe"') just answered quickly.... but that should do it good luck
blizzedout Posted June 9, 2005 Author Posted June 9, 2005 (edited) IF GUICtrlRead($BROWSER2) = '"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"' thenrun("C:\Program Files\Internet Explorer\IEXPLORE.EXE"','"C:\Program Files\Mozilla Firefox\firefox.exe"')just answered quickly.... but that should do itgood luck<{POST_SNAPBACK}>Well thats not exactly what im trying to do, im trying to make it if they person checks Mozilla it will send Ctrl+L which is shortcut to the adress bar.And if IE it will send F4 which is a shortcut to their adress bar.But when i run it the way i have it, it does both. Edited June 9, 2005 by blizzedout
Valuater Posted June 9, 2005 Posted June 9, 2005 Well thats not exactly what im trying to do, im trying to make it if they person checks Mozilla it will send Ctrl+L which is shortcut to the adress bar.And if IE it will send F4 which is a shortcut to their adress bar.But when i run it the way i have it, it does both.<{POST_SNAPBACK}>try it this way$Playlist = GUICtrlcreatecombo( "Play List", 5, 190, 90)GUICtrlSetData(-1,"Joy to the World")GUICtrlSetData(-2,"Your song here")GUICtrlSetData(-3,"Your song here")GUICtrlSetData(-4,"Play List")GUICtrlSetData(-5,"Play List")$Button_P = GuiCtrlCreateButton("Play Song", 10, 230, 70, 20)
blizzedout Posted June 9, 2005 Author Posted June 9, 2005 Having a problem with the if statement working with combo box$BROWSER = GUICtrlCreateCombo ('"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"', 17,151,300) $BROWSER2 = GUICtrlSetData(-1,'"C:\Program Files\Internet Explorer\IEXPLORE.EXE"','"C:\Program Files\Mozilla Firefox\firefox.exe"') IF GUICtrlRead($BROWSER2) = '"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"' then Send("^l") ElseIf GUICtrlRead($BROWSER2) = '"C:\Program Files\Internet Explorer\IEXPLORE.EXE"' then Send("F4") EndIF<{POST_SNAPBACK}>I dont have a problem running it i use this line to run:Run(GUICtrlRead($BROWSER))
blizzedout Posted June 9, 2005 Author Posted June 9, 2005 Well thats not exactly what im trying to do, im trying to make it if they person checks Mozilla it will send Ctrl+L which is shortcut to the adress bar.And if IE it will send F4 which is a shortcut to their adress bar.But when i run it the way i have it, it does both.<{POST_SNAPBACK}>and how should the if statement look?
Valuater Posted June 9, 2005 Posted June 9, 2005 i think the problem is setting data #2 ... like the example i gave you above... i don't think its actually your "if statement" 8)
blizzedout Posted June 9, 2005 Author Posted June 9, 2005 (edited) I dont have a problem running it i use this line to run:Run(GUICtrlRead($BROWSER))<{POST_SNAPBACK}>Omg thx that worked,$BROWSER = GUICtrlCreateCombo ('"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"', 17,151,300) GUICtrlSetData(-1,'"C:\Program Files\Internet Explorer\IEXPLORE.EXE"') GUICtrlSetData(-2,'"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"')andIF GUICtrlRead($BROWSER) = '"C:\Program Files\Mozilla Firefox\FIREFOX.EXE"' then Send("^l") ElseIf GUICtrlRead($BROWSER) = '"C:\Program Files\Internet Explorer\IEXPLORE.EXE"' then Send("{F4}") EndIF Edited June 9, 2005 by blizzedout
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