Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If equals numbers
#1
Hey easy question for ya probably, how would i do an if satement so if(Text = 7 numbers)

will be a random 7 numbers

like
idCon=6793020
idDan=5968382
idSam=4820505

There ID's for a program im working with for people at work.

Thanks.
#2

Could you explain with a little more detail?
Taking on Quick Macros one day at a time
#3
Hmmm, all i really need to do is figure out if a group of 7 characters are all numbers or not.
#4
val
>
<
#5
I really enjoy using regex when i can!

Code:
Copy      Help
str a="1234567"
_i=findrx(a "\d{7}")
if(len(a)=7)
,if _i=-1
,,out "not 7 digits"
An old blog on QM coding and automation.

The Macro Hook
#6
I dont seem to understand this code? And it doesnt want to work....Can you please explain a little what it does and wut it should do.

Thanks and sorry for not understanding it
#7
this just checks if there are 7 numbers like you wanted.


Quote:Hmmm, all i really need to do is figure out if a group of 7 characters are all numbers or not.
An old blog on QM coding and automation.

The Macro Hook
#8
i kinda dont understand where it tells if there are or arent 7 numbers :?:

can u just add like out "yes" or out "no" if there are 7 numbers or not plz

Thanks, really sorry to bother you.
#9
Nevermind i think i understand it now, thanks a ton sorry for the trouble!


Forum Jump:


Users browsing this thread: 1 Guest(s)