[Ri...] Posted Wednesday at 11:28 AM Share Posted Wednesday at 11:28 AM I want to make this code recognize "YES", "Yes" or "yes". //04.01.25 RS Run=inquireText("Is the Block Fixture moved out of the way?"+cr()+"You can move the fixture now."+cr()+"User must answer YES to continue."+cr()+"CMM will stop if not YES.") if Run == "YES" else cncBreak() endif //End edit I am not structuring something properly and I can't wait to see how simple it is so I can laugh at myself. Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 01:05 PM Share Posted Wednesday at 01:05 PM Well if the answers are only Yes/No, I would just use confirm instead of inquireText. 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 01:11 PM Share Posted Wednesday at 01:11 PM But you can use case conversion if you are trying to convert. Run = inquireText("Is the Block Fixture moved out of the way?" + cr() + "You can move the fixture now." + cr() + "User must answer YES to continue." + cr() + "CMM will stop if not YES.") if text(Run).asUppercase == "YES" // continue else cncBreak() endif 2 Link to comment Share on other sites More sharing options...
[Ch...] Posted Wednesday at 01:20 PM Share Posted Wednesday at 01:20 PM (edited) There are also the following : .asLowercase and .asCapitalized and also : .startingWithUppercaseLetter Edited Wednesday at 01:27 PM 1 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 01:29 PM Author Share Posted Wednesday at 01:29 PM Please sign in to view this quote. Well, that simplified the process. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in