Jump to content

From...To....


Recommended Posts

I want to check if a variable is a number from 72 to 206,but i found no function to do so.

So, is it possible to check this?

Of course!

$var1 = 88
If InRange($var1, 72, 206) Then MsgBox(0, "$var1", "is in range 72 to 206")

Func InRange($a, $b, $c)

    If IsNumber($a) Then
        If $a >= $b And $a <= $c Then Return True
    EndIf

    Return False
EndFunc  ;==>InRange
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.
Link to comment
Share on other sites

I want to check if a variable is a number from 72 to 206,but i found no function to do so.

So, is it possible to check this?

Hi!

Read up on some conditional logic :)

$number=InputBox("Number","Please input a number between 72 and 206")
If $number>=72 And $number<=206 Then
    MsgBox(0,"Nice","Good job!")
Else
    MsgBox(16,"error","You didn't follow the orders..grr")
EndIf

:P

Broken link? PM me and I'll send you the file!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...