xtreempje Posted March 21, 2023 Share Posted March 21, 2023 $Profile1 = "Option 1" If GUICtrlRead($Profile1) = "Option 1" Then MsgBox(0,"Test","Profile 1 = Option 1") endif If GUICtrlRead($Profile1) = "Option 2" Then MsgBox(0,"Test","Profile 1 = Option 2") endif If GUICtrlRead($Profile1) = "Option 3" Then MsgBox(0,"Test","Profile 1 = Option 3") endif If GUICtrlRead($Profile1) = "Option 4" Then MsgBox(0,"Test","Profile 1 = Option 4!") endif It's probl a simple thing what im missing but now it displays all Options instead of the Option 1. I only need it to select the option that the $Profile1 is set to. Link to comment Share on other sites More sharing options...
Danp2 Posted March 21, 2023 Share Posted March 21, 2023 GuiCtrlRead is used to access a control, not a variable. Try this -- $Profile1 = "Option 1" Switch $Profile1 Case "Option 1" MsgBox(0,"Test","Profile 1 = Option 1") Case "Option 2" MsgBox(0,"Test","Profile 1 = Option 2") Case "Option 3" MsgBox(0,"Test","Profile 1 = Option 3") Case "Option 4" MsgBox(0,"Test","Profile 1 = Option 4!") EndSwitch Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
xtreempje Posted March 21, 2023 Author Share Posted March 21, 2023 ah super thanks man that really helped :)! 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