Jump to content

Recommended Posts

Posted (edited)

I think i got the title wrong...maybe its suppose to be "Randomly choosing a message then typing it"

i need a script that will randomly choose a message from a list then type it in the active ___(what do you call them???like the place where you type something when you are creating posts)

Edited by rrrm99
Posted (edited)

  Zedna said:

Look at Sloganizer

Anybody know how to make it type on notepad/anything you can type stuff on

im currently not good at editing scripts with GUI's(right term?)

Edited by rrrm99
Posted

Hi,

A while ago i needed function that animate the title of window, so i have made a small(?) function that help me with that (_StringRandomize() and also _StringMove() to help this function :) )...

#include <String.au3>

$hWnd = WinGetTitle("")

TitleAnimate($hWnd, $hWnd, 5, 3)

Func TitleAnimate($hWnd, $FinalTitle, $AniSpeed=0, $TimeToAnimate=5)
    If Not IsHWnd($hWnd) Then $hWnd = WinGetHandle($hWnd)
    Local $CurrentWinTitle = WinGetTitle($hWnd)
    Local $TitlesArr = StringSplit($CurrentWinTitle, "")
    Local $NewTitle = ""
    Local $Timer = TimerInit()
    
    For $iT = 1 To $TitlesArr[0]
        Sleep($AniSpeed)
        $NewTitle = _StringRandomize($CurrentWinTitle)
        WinSetTitle(WinGetTitle($hWnd), "", $NewTitle)
        If TimerDiff($Timer)/1000 >= $TimeToAnimate Then ExitLoop
    Next
    WinSetTitle(WinGetTitle($hWnd), "", $FinalTitle)
EndFunc

Func _StringRandomize($String)
    If StringLen($String) = 0 Then Return
    Local $StrArr = StringSplit($String, ""), $iS, $StrArr, $RandomStr
    For $iS = 1 To $StrArr[0]
        $RandomStr = Random(1, $StrArr[0], 1)
        $String = _StringMove($String, $StrArr[$iS], $RandomStr)
    Next
    Return $String
EndFunc

Func _StringMove($String, $FindStr, $NewPos)
    If StringLen($String) = 0 Then Return
    If Not StringInStr($String, $FindStr) Then Return $String
    Local $NewStr=StringReplace($String, $FindStr, "", 1)
    If $NewPos >= StringLen($String) Then $NewPos = StringLen($String)-1
    Return _StringInsert($NewStr, $FindStr, $NewPos)
EndFunc

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

  magician13134 said:

You can use Send("Text") to simulate those keys...

i know i just dont know how to make it choose what message

________________________________________________________________

Can anybody make me a script that will use the Random()

and then pop up a msgbox if number [random number here] pops up then it will have a different message for each number in the MSGbox then it will

read it then type it to the window [insert window title here]

Posted (edited)

  Assault said:

global $ran = random(1,5);$ran will be a random number from 1-5

if $ran = 1 Then;if 1 it will make a message box with the message
    msgbox(0,"msg","msg")
EndIf
if $ran = 2 Then
    msgbox(0,"msg","msg")
EndIf
if $ran = 3 Then
    msgbox(0,"msg","msg")
EndIf
if $ran = 4 Then
    msgbox(0,"msg","msg")
EndIf
if $ran = 5 Then
    msgbox(0,"msg","msg")
EndIf

Is this what you wanted?

Partialy...

how do you make it read the MSGbox then type something in [insert Window title here] according to the message

like if it shows up

msgbox(0,"msg","blablablabla")

then it will type the words OMG in [insert window title here]

Edited by rrrm99
Posted

  rrrm99 said:

Partialy...

how do you make it read the MSGbox then type something in [insert Window title here] according to the message

like if it shows up

msgbox(0,"msg","blablablabla")

then it will type the words OMG in [insert window title here]

Does WinSetTitle() ring a bell? It's in the help file.

George

  Reveal hidden contents
Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Posted (edited)

  herewasplato said:
yes...but i still don't know all the functions and what they do(only know the mousclicks a few win comands)

here is my script...

; Start of Script.Do not edit anything unless told
MouseClick ("left", 50, 755, 1)
MouseClick ("left", 85, 320, 1)
WinActivate ("http://www.yahoo.com/ - Microsoft Internet Explorer")
WinWaitActive ("http://www.yahoo.com/ - Microsoft Internet Explorer")
MouseClick ("left", 150, 70, 1)
WinActivate ("No page to display - Microsoft Internet Explorer")
WinWaitActive ("No page to display - Microsoft Internet Explorer")
MouseClickDrag ("left", 195, 105, 75, 105)
Send ("http://prankmail.org")
Send ("{ENTER}")
WinActivate ("Prankmail | Making email fun again - Microsoft Internet Explorer")
WinWaitActive ("Prankmail | Making email fun again - Microsoft Internet Explorer")
Sleep (20000)
MouseClick( "left", 305, 650, 1)
Sleep (20000)
MouseClick ("left", 410, 310, 1)
; Email To...need to randomize
Send ("PutEmail@Here.com")
MouseClick ("left", 420, 330, 1)
;Email From...do not need to randomize
Send ("PutEmail@here.com")
MouseClick ("left", 395, 350, 1)
; Subject Below...do not need to randomize
Send ("Subject Here")
MouseClick ("left", 420, 370, 1)
; Now i need the randomizer below
;Put Randomizer here
Send ("what ever the randomizer randomized")
;Script Ends Here...

i need the someone to edit the script so it does the randomize thingies

and as you can see i have very limited autoit knowledge

and it might not work if you try it on your comp

Edited by rrrm99

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...