Sign in to follow this  
Followers 0
alaa777

check if the # is Infinity or undefind

9 posts in this topic

i need to check if the result is infinty or undefind number

Share this post


Link to post
Share on other sites



What the heck?

Do you think anybody gets anything out of that post?

I am sorry but I dont even see a question.

I am willing to help if you specify a bit what you mean.

Give a script snippet or something, so we have anything to start with

Thank you!

Share this post


Link to post
Share on other sites

ok what i need is chek the result of math operation if it infinty nomber or undefind nomber to do some thing insted of showing the result

Share this post


Link to post
Share on other sites

ok what i need is chek the result of math operation if it infinty nomber or undefind nomber to do some thing insted of showing the result

Maybe

If IsNumber($something) then/else


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

If IsNumber($L) Then
Else 
MsgBox(0,"Error","Check your Input Data"&@LF&"Click ok to show the result")
EndIf

not working

Edited by alaa777

Share this post


Link to post
Share on other sites

in the result it shows "-1.#IND" or "1.#INF"

i want to show that box

MsgBox(0,"Error","Check your Input Data"&@LF&"Click ok to show the result")
befor showing such result

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

in the result it shows "-1.#IND" or "1.#INF"

i want to show that box

MsgBox(0,"Error","Check your Input Data"&@LF&"Click ok to show the result")
befor showing such result
Where is the result coming from? If the result is a string, or can be made into a string, then you can see if it's a valid number, integer, real etc like this

$result = StringStripWS($result,3)
if stringcompare($result,string(number($result)))=0 then
    msgbox(0,$result,'is a valid number')
Else
    msgbox(0,$result,'is not a valid number')
EndIf
Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

thx so much it`s working :)

Share this post


Link to post
Share on other sites

thx so much it`s working :)

That's good, glad to help.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0