Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/23/2014 in all areas

  1. One line. #include "czardas.au3" _czardas() czardas.au3 Func _czardas() Local $a2[3] = ["lost", "won", 5 & Random(1, 49, 1)] While Not StringInStr($a2[2], "|", 0, 6) $a2[2] = StringRegExpReplace($a2[2] & StringRegExpReplace($a2[2] & "|" & 5 & Random(1, 49, 1), "(" & $a2[2] & ")", ""), "\|+", "|") WEnd Return MsgBox(0, "Lottery", "You " & $a2[StringStripWS(StringRegExpReplace(StringRegExpReplace(InputBox("Enter 7 Numbers", ""), "(\A| )", "5"), "(" & $a2[2] & ")", ""), 8) = ""]) EndFunc ;==>_czardas
    5 points
  2. czardas

    Lottery - Challenge

    No, includes, no error checks and no ternary operator. If you enter an empty string you will confuse it. You have to check yourself that you have entered 7 unique numbers between 1 and 49 separated by spaces otherwise you might think you have won when you haven't. An additional error check would require an extra line of code. Local $a2[3] = ["lost","won",5 & Random(1,49,1)] While Not StringInStr($a2[2],"|",0,6) $a2[2] = StringRegExpReplace($a2[2] & StringRegExpReplace($a2[2] & "|" & 5 & Random(1,49,1) , "(" & $a2[2] & ")", "") , "\|+", "|") WEnd MsgBox(0, "Lottery", "You " & $a2[StringStripWS(StringRegExpReplace(StringRegExpReplace(InputBox("Enter 7 Numbers",""), "(\A| )", "5"), "("&$a2[2]&")", ""), 8) = ""]) : Edit : Changed one word in the description.
    2 points
  3. FireFox

    Lottery - Challenge

    Loops already take 2 lines
    1 point
  4. Hi Wildbook have a look to >this nice example/tutorial, it can give you some directions >here an attempt I made time ago
    1 point
  5. ok, I will try. Thanks you very much, The Automator.
    1 point
  6. $Input1 is an identifier to a control in your script, you need to read what's in that control.
    1 point
  7. Hi fikri1979 Mr. JohnOne is pointing where you will find the bug I give you another little help: $Input1 is the reference to the InputBox, not to the external program which was launched... add a variable to the ShellExecute command in this way (this will be handy later) $MyRef = ShellExecute (GUICtrlRead ($ Input1)) the ShellExecute command returns a reference to something that... I can not remember now, please Take a look at the ShellExecute command in help
    1 point
  8. Try to compare it with this. ShellExecute(GUICtrlRead($Input1))
    1 point
  9. mountainictbka57, There is no function like _ScreenCapture_Capture in c# so i guess you have to use a 3rd party dll or make some autoit script and compile it to exe, then call it with your arguments.. but that will be a serious workaround.. I'm not a C# programmer but you can always use a popular search engine to find an answer... Your making a C# program and you want to implement some autoit functions right? The autoit activeX dll ha's no screen capture functions in it, but the dll "JSdraw" does, so why can't you use that? Regards, TheAutomator.
    1 point
×
×
  • Create New...