Jump to content
Sign in to follow this  
blizzedout

Combo with the if statement help

Recommended Posts

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

Share this post


Link to post
Share on other sites

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


NEWHeader1.png

Share this post


Link to post
Share on other sites

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

<{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 by blizzedout

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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))

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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"')

and

IF 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 by blizzedout

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...