Jump to content

Send()


Recommended Posts

here is a script im making for a m8...

CODE
run("notepad")

winwaitactive("Untitled")

Send(Random(1,1000,1))

Sleep(1000)

Send(random(a,abcdefghijklmonprstuvwxyz,a))

But it dont work... it wont send random letter...

Plus the output random must be between 5 and 20 characters long... numbers and letters ONLY

Edited by SalazarCheats

Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes

Link to comment
Share on other sites

  • Developers

here is a script im making for a m8...

CODE
run("notepad")

winwaitactive("Untitled")

Send(Random(1,1000,1))

Sleep(1000)

Send(random(a,abcdefghijklmonprstuvwxyz,a))

But it dont work... it wont send random letter...

Plus the output random must be between 5 and 20 characters long... numbers and letters ONLY

Where did you find this syntax ?

random(a,abcdefghijklmonprstuvwxyz,a)

Look for Asc() and Random() in the helpfile .. :whistle:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

CODE
run("notepad")

winwaitactive("Untitled")

Send(Random(1,1000,1))

Sleep(1000)

Send(random("a,abcdefghijklmonprstuvwxyz,a"))

worked with quotes around the string
Compiles: Yes

Works: No way in hell

Do what JdeB said.

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

random doesn't work with letters. only numbers. look at the following example for some direction.

If Random() < 0.5 Then
    ;Capitals
    $Letter = Chr(Random(Asc("A"), Asc("Z"), 1))
Else
    ;Lower case
    $Letter = Chr(Random(Asc("a"), Asc("z"), 1))
Endif
Link to comment
Share on other sites

i have tryed everything that you have told me and it still dont work...

What exactly not work? be more specific, in that way only you can get some help :lmao:

What is you trying to do? what the task :P

Maby better that you start from learning about some simple examples of how Random works, and then go to the Chr() funcs, and then Asc()...String... Number... and then.... hm... are you has learning about Random already? :whistle::D

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

Here was i said a few days ago

here is a script im making for a m8...

CODE
run("notepad")

winwaitactive("Untitled")

Send(Random(1,1000,1))

Sleep(1000)

Send(random(a,abcdefghijklmonprstuvwxyz,a))

But it dont work... it wont send random letter...

Plus the output random must be between 5 and 20 characters long... numbers and letters ONLY

Im trying to do this to make random passwords... Don't ask me why my m8 wants it...

Can anyone help me!!!

Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes

Link to comment
Share on other sites

  • Developers

Here was i said a few days ago

Im trying to do this to make random passwords... Don't ask me why my m8 wants it...

Can anyone help me!!!

...and what have you done with all posted help/scriptlets ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

is u meen all the help allready been givin to me... they didnt work...

they do if applied correctly .... show what you have done and still problems with.... but don't expect people to produce code on request .

:whistle:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

they do if applied correctly .... show what you have done and still problems with.... but don't expect people to produce code on request .

:whistle:

Here is what i have so far... That works but it dont send any letter/s

CODE
#NoTrayIcon

;script starts here

run("notepad")

winwaitactive("Untitled") ;waits untill windo is open

Send(Random(1,1000,1)) ;send Random numbers

Sleep(1000) ;Sleeps

Send(random("a,abcdefghijklmonprstuvwxyz,a")) ;Sends Random letters (This don't work)

;here i need it to stop sending letters at a Random number of numbers and letter... it has to be between 5 and 20 characters long.

it woruld be bests if it sent both letter and numbers in any random order...

Like...'g6h7gh657'

But at the moment it would be like #897hytgjuyt'

Plz can anyone help

Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes

Link to comment
Share on other sites

  • Developers

Here is what i have so far... That works but it dont send any letter/s

CODE
#NoTrayIcon

;script starts here

run("notepad")

winwaitactive("Untitled") ;waits untill windo is open

Send(Random(1,1000,1)) ;send Random numbers

Sleep(1000) ;Sleeps

Send(random("a,abcdefghijklmonprstuvwxyz,a")) ;Sends Random letters (This don't work)

;here i need it to stop sending letters at a Random number of numbers and letter... it has to be between 5 and 20 characters long.

it woruld be bests if it sent both letter and numbers in any random order...

Like...'g6h7gh657'

But at the moment it would be like #897hytgjuyt'

Plz can anyone help

The above doesn't show much progress ...does it ?

Here is a func I use to generate a random password of 3 letters 3 numbers starting with a Capital letter.

; Generate New Password
Func GenPassWord(ByRef $NewPsw)
    $NewPsw = Chr(65 + Random(0, 25, 1))
    $NewPsw = $NewPsw & Chr(97 + Random(0, 25, 1))
    $NewPsw = $NewPsw & Chr(97 + Random(0, 25, 1))
    $NewPsw = $NewPsw & Random(1, 9, 1)
    $NewPsw = $NewPsw & Random(1, 9, 1)
    $NewPsw = $NewPsw & Random(1, 9, 1)
EndFunc   ;==>GenPassWord

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

sorry it dont work can u make it so it types in to a notepad as well plz

This Func does work , no question in my mind.....

.. and I am not going to write the rest for you because you should be able to do it yourself .....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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