ludocus 8 Report post Posted March 28, 2008 Look i am making a program writer : expandcollapse popup$h = InputBox ( "Welcome", "Title of program to be written?" ) $pK = InputBox ( "Qeustion", "How many lines?" ) sleep ( 1000 ) send ( '^n' ) send ( '^' ) sleep ( 100 ) send ('+') sleep ( 100 ) send ( 's' ) sleep ( 100 ) send ( $h&'.au3'&@CRLF ) $win = WinGetTitle ('') if not WinActive ( $win ) then WinActivate ( $win ) send ( ';program name: '&$h&' Created with: Easy program builder'&@CRLF ) $r = random ( 0, 100, 1 ) if $r < 50 then $k = 0 if $r > 50 then $k = 1 send ( 'Opt("TrayIconHide", '&$k&')' &@CRLF) $s = 1 $TelCount = 0 WHile $s if $telCount = $pK then $s = 0 $r1 = Random ( 0, 200, 1 ) if not WinActive ( $win ) then WinActivate ( $win ) if $r1 < 100 then $gui = 'false' if $r1 > 100 then $gui = 'true' if $gui = 'true' Then if not WinActive ( $win ) then WinActivate ( $win ) $t = Random ( 0, 9, 1 ) Global $tR[10] = ['Program','Title','Something','HandyMan','DoItSelf','TryHard','Evolution Pro','HardMan','Steel Barier','Cooooool'] $r2 = random ( 100, 500, 1 ) if not WinActive ( $win ) then WinActivate ( $win ) send ( '$g100 = GUICreate ( "'&$tR[$t]&'", "'&$r2&'", "'&$r2&'" )'&@CRLF ) Else $MM = Random ( 0, 10, 1 ) global $ttt[10] = ['Error', 'Test', 'Hello', 'Welcome', 'Have a nice day', 'Please...', 'An Error has ocurred', 'OMG', "it's just amazing", 'Shit..' ] $M = Random ( 0, 9, 1 ) global $tt[10] = ['Something went wrong..','Drink some red bull', 'If you want it to work please call 112', 'see Ya', 'Have A Great Day', 'something line....', 'it is so wonderfull', 'You know what to do right?', 'put on some make up', 'Red bull cures your worries..' ] if not WinActive ( $win ) then WinActivate ( $win ) send ( 'msgbox ( 0, "'&$ttt[$MM]&'", "'&$tt[$M]&'")'&@CRLF ) EndIf $TelCount = $TelCount + 1 WEnd It doesn't work nice yet, and It doesn't do much yet.. Does anybody have ideas to put in to this program? Share this post Link to post Share on other sites
Swift 0 Report post Posted March 28, 2008 (edited) What does this do? Create a AutoIt program? Cranky, I just skimmed over it, and mostly all I saw was WinActivate() etc... Edited March 28, 2008 by R6V2 Share this post Link to post Share on other sites
ludocus 8 Report post Posted March 28, 2008 (edited) wouw... I see.. You are great at reading scripts.. OF COURSE IT WRITES AN AUTOITPROGRAM! I was asking if someone has ideas to make it something usefull -edit R6V2 I have read many of your replies (not only to me but just replies to anybody). And they're almost always NEGATIVE.. Edited March 28, 2008 by ludocus Share this post Link to post Share on other sites
weaponx 10 Report post Posted March 28, 2008 You think he's negative? Hmm. Well it looks like this is relying upon SciTe or whatever the active window is to be a text editor. If you are generating scripts it should output directly to a text file instead of manipulating a text editor. Share this post Link to post Share on other sites
Swift 0 Report post Posted March 28, 2008 (edited) Your going to bump a thread that it's last reply was 3 minutes ago?And Ludocus, my replies are not always negitive. Have you read any of my replies recently? Guess not, would you like me to show you them?(All These are not negitive)1) #4986432) #4986213) #4985814) #498417Now please tell me the posts are negitive.EDIT: That's only a few. Edited March 28, 2008 by R6V2 Share this post Link to post Share on other sites
weaponx 10 Report post Posted March 28, 2008 Why are you bumping? You need to rework your logic. Instead of using Send() to place text into an editor, use FileWrite() and FileWriteLine() to output to an au3 file. Share this post Link to post Share on other sites
weaponx 10 Report post Posted March 28, 2008 I translated this code to human and here is what it might look like: expandcollapse popup$h = InputBox("Welcome", "Title of program to be written?") $pK = InputBox("Qeustion", "How many lines?") $outFile = "test.au3" FileDelete($outFile ) $fileHandle = FileOpen($outFile, 1) FileWrite($fileHandle, ';program name: ' & $h & ' Created with: Easy program builder' & @CRLF) $k = Random(0, 1, 1) FileWrite($fileHandle, 'Opt("TrayIconHide", ' & $k & ')' & @CRLF) $s = true $TelCount = 0 While $s If $TelCount = $pK Then $s = false $gui = Random(0, 1, 1) If $gui Then Global $tR[10] = ['Program', 'Title', 'Something', 'HandyMan', 'DoItSelf', 'TryHard', 'Evolution Pro', 'HardMan', 'Steel Barier', 'Cooooool'] $t = Random(0, Ubound($tR) - 1, 1) $r2 = Random(100, 500, 1) FileWrite($fileHandle, '$g100 = GUICreate ( "' & $tR[$t] & '", "' & $r2 & '", "' & $r2 & '" )' & @CRLF) Else Global $ttt[10] = ['Error', 'Test', 'Hello', 'Welcome', 'Have a nice day', 'Please...', 'An Error has ocurred', 'OMG', "it's just amazing", 'Shit..'] $MM = Random(0, Ubound($ttt) - 1, 1) Global $tt[10] = ['Something went wrong..', 'Drink some red bull', 'If you want it to work please call 112', 'see Ya', 'Have A Great Day', 'something line....', 'it is so wonderfull', 'You know what to do right?', 'put on some make up', 'Red bull cures your worries..'] $M = Random(0, Ubound($tt) - 1, 1) FileWrite($fileHandle, 'msgbox ( 0, "' & $ttt[$MM] & '", "' & $tt[$M] & '")' & @CRLF) EndIf $TelCount += 1 WEnd Share this post Link to post Share on other sites
ludocus 8 Report post Posted March 29, 2008 Your going to bump a thread that it's last reply was 3 minutes ago?And Ludocus, my replies are not always negitive. Have you read any of my replies recently? Guess not, would you like me to show you them?(All These are not negitive)1) #4986432) #4986213) #4985814) #498417Now please tell me the posts are negitive.EDIT: That's only a few.I am sorry R6V2I take it back Share this post Link to post Share on other sites
ludocus 8 Report post Posted March 29, 2008 thnx weaponx Share this post Link to post Share on other sites