Jump to content

Search the Community

Showing results for tags 'range of numbers'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I want between two $iMin and $iMax numbers to choose a number $iSelectNumber and whenever the user gives a number $iInputNumber, the $iMin and the $iMax to dynamically change as many times as necessary. Example: between 1 and 100 to choose 67. Step1. Range: 1 -100 Step2. InputNumber: 70 -> Range: 1 – 70 Step3. InputNumber: 34 -> Range: 34 – 70 Step4. InputNumber: 55 -> Range: 55 - 70 Step5. InputNumber: 69 -> Range: 55 – 69 Stepn. .... I created the following function which returns the range properly the first time you call. Because the $iMin and the $iMax are fixed every time when call my function initializes the $iMinNew and the $iMaxNew and do not want it. Const $iMin = 1 Const $iMax = 100 Const $iSelected = 67 Func _Range($iInputNumber, $iSelected, $iMin, $iMax) ; Returns the range of the numbers in which the selected number included Local $aRange[2] Local $iMinNew = $iMin Local $iMaxNew = $iMax If $InputNumber < $iSelected Then $aRange[0] = $iInputNumber $aRange[1] = $iMaxNew $iMinNew = $iInputNumber Else $aRange[0] = $iMinNew $aRange[1] = $iInputNumber $iMaxNew = $iInputNumber EndIf Return $aRange EndFunc ;==>_Range I want a help in the algorithm.
×
×
  • Create New...