Loop Posted February 6, 2017 Share Posted February 6, 2017 expandcollapse popupLocal $Clipboard While True $Clipboard = ClipGet() If StringInStr($Clipboard, "3001") Then found_number() If StringInStr($Clipboard, "3002") Then found_number() If StringInStr($Clipboard, "3003") Then found_number() If StringInStr($Clipboard, "3004") Then found_number() If StringInStr($Clipboard, "3005") Then found_number() If StringInStr($Clipboard, "3006") Then found_number() If StringInStr($Clipboard, "3007") Then found_number() If StringInStr($Clipboard, "3008") Then found_number() If StringInStr($Clipboard, "3009") Then found_number() If StringInStr($Clipboard, "3010") Then found_number() If StringInStr($Clipboard, "3011") Then found_number() If StringInStr($Clipboard, "3012") Then found_number() If StringInStr($Clipboard, "3013") Then found_number() If StringInStr($Clipboard, "3014") Then found_number() If StringInStr($Clipboard, "3015") Then found_number() If StringInStr($Clipboard, "3016") Then found_number() If StringInStr($Clipboard, "3017") Then found_number() If StringInStr($Clipboard, "3018") Then found_number() If StringInStr($Clipboard, "3019") Then found_number() If StringInStr($Clipboard, "3020") Then found_number() If StringInStr($Clipboard, "3022") Then found_number() If StringInStr($Clipboard, "3023") Then found_number() If StringInStr($Clipboard, "3024") Then found_number() If StringInStr($Clipboard, "3025") Then found_number() If StringInStr($Clipboard, "3026") Then found_number() If StringInStr($Clipboard, "3027") Then found_number() If StringInStr($Clipboard, "3028") Then found_number() If StringInStr($Clipboard, "3029") Then found_number() If StringInStr($Clipboard, "3030") Then found_number() WEnd Func found_number() MouseClick("right", 850,900,1) MouseClick("left", 860,930,1) EndFunc Please someone lowers the 30 lines, I have no idea to do this. Link to comment Share on other sites More sharing options...
jguinch Posted February 6, 2017 Share Posted February 6, 2017 If StringRegExp($Clipboard, "30(?:0[1-9]|[12][0-9]|30)") Then found_number() Loop, Danyfirex and careca 3 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Loop Posted February 6, 2017 Author Share Posted February 6, 2017 2 hours ago, jguinch said: If StringRegExp($Clipboard, "30(?:0[1-9]|[12][0-9]|30)") Then found_number() THANK YOU ... And if it were a number of 2,000 to 100,000? Link to comment Share on other sites More sharing options...
jguinch Posted February 6, 2017 Share Posted February 6, 2017 1) 2000 to 9999 is : - [2 to 9] followed by 3 numbers : [2-9]\d{3} 2) 10000 to 99999 is : - [1 to 9] followed by 4 numbers : [1-9]\d{4} 3) 100000 is : - 1 followed by 5 "0" : 10{5} You want to the check if the string matches 1 Or 2 Or 3 :[2-9]\d{3} or [1-9]\d{4} or 10{5} So the pattern is [2-9]\d{3}|[1-9]\d{4}|10{5} Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF 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