Jump to content

Recommended Posts

Posted

Look i am making a program writer :):

$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?

Posted (edited)

What does this do? Create a AutoIt program?

Cranky, I just skimmed over it, and mostly all I saw was WinActivate() etc...

Edited by R6V2
Posted (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 by ludocus
Posted

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.

Posted (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) #498643

2) #498621

3) #498581

4) #498417

Now please tell me the posts are negitive.

EDIT: That's only a few.

Edited by R6V2
Posted

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.

Posted

I translated this code to human and here is what it might look like:

$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
Posted

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) #498643

2) #498621

3) #498581

4) #498417

Now please tell me the posts are negitive.

EDIT: That's only a few.

I am sorry R6V2

I take it back :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...