Jump to content

Is This Possible ?


Recommended Posts

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^
Link to comment
Share on other sites

  • Developers

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

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

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.

Link to comment
Share on other sites

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!
Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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.
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...