In the spirit of the >last challenge, here is a new one for the community.
Challenge: Create the smallest number of lines of AutoIt code to check if a number is a prime number e.g. 3, 7 or 11. You must include the ability to ask the user to enter a number and you're allowed to use UDFs. Also the use of /AutoIt3ExecuteScript is frowned upon and will not be accepted as a solution.
Good luck.
PS If you use someone else's code, then provide a link as to where you obtain it from, otherwi
Surely not the most compact entry, but this one handles large inputs:
#include <String.au3>
#include "..\Include\BigNum.au3"
Local $Inp, $bComposite
While 1
$Inp = InputBox("Prime challenge", "Enter a positive number", "0")
If @error Then ExitLoop
$Inp = StringRegExpReplace($Inp, "^(-?)0*(\d+)$", "$1$2")
If StringLeft($Inp, 1) <> '-' Then
If StringLen($Inp) < 5 Then
$Inp = Int($Inp)
$bComposite = StringRegExp(_StringRepeat('1', $Inp), '^1?$|^(11+?)\1+$')
Else
$b