Sign in to follow this  
Followers 0
YpR^

Is This Possible ?

14 posts in this topic

#1 ·  Posted (edited)

Is it possible to make a script which start Notepad and simulate the keystroke of:

____

(. \

\ |

\ |___(\--/)

__/ ( . . )

"'._. '-.O.'

'-. \ "|\

'.,, / '.,,

f.ex... can't use the "send" command coz it says error.... if i f.eks. use

send(" (")(")HELLO(")(") ")

I get the errors coz of the "(")" .... while they're a command too

What to do ? =)

my ascii pic seems to fade away :D ... but hope u get the point,..

Edited by YpR^

Share this post


Link to post
Share on other sites



See FAQ #7 in the help file.

Share this post


Link to post
Share on other sites

The AutoIt helpfile ? ... or... dont really unerstand =)


Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Is it possible to make a script which start Notepad and simulate the keystroke of:

____

did you try to do this manually ???

because i think that Notepad only takes one font for all its characters...

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The AutoIt helpfile ? ... or... dont really unerstand =)

yes, autoit help file, usually in C:\Program Files\Autoit3\

-Brett

Share this post


Link to post
Share on other sites

you could read in the

[FONT=Courier] ____
(. \
\ | 
\ |___(\--/)
__/ ( . . )
"'._. '-.O.'
'-. \ "|\
'.,, / '.,,
[FONT=Times]

stuff from a textfile for example.

But check the docs :D


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

Read the helpfile to figure this out:

$x=StringReplace(StringReplace('[FONT=Courier] ____#(. \#\ |#\ |___(\--/)#__/ ( . . )#"?._. ?-.O.?#?-. \ "|\#?.,, / ?.,,#[FONT=Times]','?',"'"),'#',@crlf)
send($x,1)

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Read the helpfile to figure this out:

$x=StringReplace(StringReplace('[FONT=Courier] ____#(. \#\ |#\ |___(\--/)#__/ ( . . )#"?._. ?-.O.?#?-. \ "|\#?.,, / ?.,,#[FONT=Times]','?',"'"),'#',@crlf)
send($x,1)
Now that's a useful trick.

I usually end up doing

$x = "first line" & @CRLF

$x = $x & "line 2" & @CRLF

$x = $x & "and so on" & @CRLF

P.S. When I first saw that code, I thought I landed in a Perl forum :D

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

When I saw that I didn't know where the hell I landed, so at least you were more coherent than me...

That does look rather useful. I bet you $5 I'll be using that tomorrow when I write a script with 2 embedded batch files. :D

Share this post


Link to post
Share on other sites

Now that's a useful trick.

I usually end up doing

$x = "first line" & @CRLF

$x = $x & "line 2" & @CRLF

$x = $x & "and so on" & @CRLF

P.S.  When I first saw that code, I thought I landed in a Perl forum :D

why does it press {Enter} twicer after every stroke ? ....

ffffff

ffffff

ffffff

instead of

ffffff

ffffff

ffffff


Share this post


Link to post
Share on other sites

The macro @CRLF is actually two characters (@CR & @LF.) Try using just one, or use the {ENTER} in your Send() function.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Opt("WinTitleMatchMode",2)
Run("Notepad.exe")
WinWait("Notepad")
ControlSend ("Notepad","","Edit1",_
"[FONT=Courier] ____{enter}" &_
"(. \ {enter}" &_
"\ | {enter}" &_
"\ |___(\--/){enter}" &_
"__/ ( . . ){enter}" &_
"""'._. '-.O.'{enter}" &_
"'-. \ ""|\{enter}" &_
"'.,, / '.,,{enter}" &_
"[FONT=Times]" )

It seemed so easy to me, that I am afraid that I lost something... :D

Share this post


Link to post
Share on other sites

My version on all my computers never double the line spaces. Might be your appilication, but you can use the {enter} if you wish as well.

$x=StringReplace(StringReplace('[FONT=Courier] ____#(. \#\ |#\ |___(\--/)#__/ ( . . )#"?._. ?-.O.?#?-. \ "|\#?.,, / ?.,,#[FONT=Times]','?',"'"),'#',"{enter}")
send($x)

However if you had any of the modifier keys It won't work. !^+ etc.

send(StringReplace("LLL#lll#LLL#lll","#",@CRLF),1)

Does this code give you:

LLL

lll

LLL

lll

or

LLL

lll

LLL

lll

???


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Opt("WinTitleMatchMode",2)
Run("Notepad.exe")
WinWait("Notepad")
ControlSend ("Notepad","","Edit1",_
"[FONT=Courier] ____{enter}" &_
"(. \ {enter}" &_
"\ | {enter}" &_
"\ |___(\--/){enter}" &_
"__/ ( . . ){enter}" &_
"""'._. '-.O.'{enter}" &_
"'-. \ ""|\{enter}" &_
"'.,, / '.,,{enter}" &_
"[FONT=Times]" )

It seemed so easy to me, that I am afraid that I lost something... :D

There are no characters in that ASCII picture which jump out at me, but keep in mind that if a #, ^, +, or ! appear, they will be treated as WinKey, Control, Shift and Alt respectively, and not as those literal characters.

Share this post


Link to post
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
Sign in to follow this  
Followers 0