Jump to content

Search the Community

Showing results for tags 'simple math test'.



More search options

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Ok I was writing a script where variables change value and I need to find out which one is the smaller value but greater than 0. I've tried out some codes in different ways but none work ): I don't know what I'm doing wrong since it's very simple math test. Well I'm posting the diferent codes I wrote, hope to get some head ups... BTW I'm new to Autoit, scripting and things. Test 1 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 1 If $7 > 0 And $7 < $10 And $7 < $15 Then $seven = True If $10 > 0 and $10 < $7 and $10 < $15 Then $ten = True If $15 > 0 And $15 < $7 And $15 < $10 Then $fifteen = True ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 2 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 2 If $7 <> 0 And $7 < $10 And $7 < $15 Then $seven = True ; If $10 <> 0 and $10 < $7 and $10 < $15 Then $ten = True ; If $15 <> 0 And $15 < $7 And $15 < $10 Then $fifteen = True ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 3 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 3 If Not $7 = 0 And $7 < $10 And $7 < $15 Then $seven = True ; If Not $10 = 0 and $10 < $7 and $10 < $15 Then $ten = True ; If Not $15 = 0 And $15 < $7 And $15 < $10 Then $fifteen = True ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 4 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 4 If Not $7 = 0 Then if $7 < $10 And $7 < $15 Then $seven = True EndIf ; If Not $10 = 0 Then If $10 < $7 and $10 < $15 Then $ten = True EndIf ; If Not $15 = 0 Then If $15 < $7 And $15 < $10 Then $fifteen = True EndIf ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 5 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 5 If ($7 > 0) And ($7 < $10) And ($7 < $15) Then $seven = True If ($10 > 0) and ($10 < $7) and ($10 < $15) Then $ten = True If ($15 > 0) And ($15 < $7) And ($15 < $10) Then $fifteen = True ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 6 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 6 If ($7 <> 0) And ($7 < $10) And ($7 < $15) Then $seven = True ; If ($10 <> 0) and ($10 < $7) and ($10 < $15) Then $ten = True ; If ($15 <> 0) And ($15 < $7) And ($15 < $10) Then $fifteen = True ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 7 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 7 If Not ($7 = 0) And ($7 < $10) And ($7 < $15) Then $seven = True ; If Not ($10 = 0) and ($10 < $7) and ($10 < $15) Then $ten = True ; If Not ($15 = 0) And ($15 < $7) And ($15 < $10) Then $fifteen = True ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 8 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 8 If Not $7 = 0 Then if $7 < $10 And $7 < $15 Then $seven = True EndIf ; If Not $10 = 0 Then If $10 < $7 and $10 < $15 Then $ten = True EndIf ; If Not $15 = 0 Then If $15 < $7 And $15 < $10 Then $fifteen = True EndIf ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Test 9 ;simple mathematics test to see which number is smaller but greater then zero ;whichever number is the smallest but greater than zero becomes true at the end $seven = False $ten = False $fifteen = False ;in this test $7 and $15 cannot be true unless we change the value Global $7 = 0,$10 = 10,$15 = 15 ; ; ; ;test 9 If Not $7 = 0 Then if ($7 < $10) And ($7 < $15) Then $seven = True EndIf ; If Not $10 = 0 Then If ($10 < $7) and ($10 < $15) Then $ten = True EndIf ; If Not $15 = 0 Then If ($15 < $7) And ($15 < $10) Then $fifteen = True EndIf ; if $seven = True Then MsgBox(0,"Notice!", "Seven is True" & @LF & "$7 is greater than 0 but smaller than $10 y $15",0) EndIf ; if $ten = True Then MsgBox(0,"Notice!", "Ten is True" & @LF & "$10 is greater than 0 but smaller than $7 y $15",0) EndIf ; if $fifteen = True Then MsgBox(0,"Notice!", "Fifteen is True" & @LF & "$15 is greater than 0 but smaller than $7 y $10",0) EndIf Well that's all I got I've finally finished copying..... I know I'm provably doing so much lines for a simple thing but again I'm a noob.
×
×
  • Create New...