LarsJ Posted July 31, 2017 Share Posted July 31, 2017 It's not the Switch line that fails. It's the Case lines that fails. In a Switch statement you can only use literal values in the Case lines. From the Help file: Case <value> [To <value>] [,<value> [To <value>] ...] You cannot use expressions eg. string functions on the Case values in a Switch statement. StringInStr() will not work. You can use expressions on the Case values in a Select statement. From the Help file: Case <expression1> StringInStr() works in a Select statement. And you can use expressions in If statements. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
shornw Posted August 18, 2017 Author Share Posted August 18, 2017 Well identified - thank you for this information which has finally clarified the behaviour I was seeing [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] 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