Sign in to follow this  
Followers 0
jvnorris

Moving From AHK

9 posts in this topic

#1 ·  Posted (edited)

Please dont kil me but I am converting from Auto Hotkey to AU3 and I am at a loss on making a multiline send.

My old format in AHK was this

SendInput,
(
%AlertType%

%Body%

{Enter 2}
Thank you,

James V Norris II
3rd Shift Team Lead
XXX.XXX.XXX
Tel.:(XXX) XXX-XXXX
E-Mail:  XXXXX@XXXXX.XXX

)

Simpelist terms this is just a single Send command sending multiple lines the stuff in "%" are variables. The only problem is I cant see a way to do the same with AU3. If its not possible that is OK I can hand format all hte textblocks line for line but it would be easier to convert things if I can just send whole blocks of text. Or compile what I want into a temp text file then just copy and paste but i preferre to keep it all in the script.

Is this possible. I have tried multiple searches but cant seem to find anything. Either I am not searching right (Checked Multiline, Text, Textblock, Block of text, Multiline strings) and many more Am I thinking the wrong thing?

Even if not I will still stay with AU3 it is soo much better then AHK

Edited by jvnorris

Share this post


Link to post
Share on other sites



Dim $AlertType = "Whatever alert"
Dim $sBody = "This is a body of text."

Send($AlertType & @CRLF & _
    $sBody & "{ENTER}" & _
    "James V Norris II" & @CRLF & _
    "3rd Shift Team Lead" & @CRLF & _
    "XXX.XXX.XX" & @CRLF & _
    "Tel.: (XXX) XXX-XXXX" & @CRLF & _
    "E-Mail:    XXXXX@XXXXX.XX")


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

THank you Smoke'n. I think I did see something about this somewhare but It may have been VB (Which I have never used before) I will give this a try. It should be a little easier.

Also Do the Variables that will be used in there HAVE to be DIMs arrays or can they just be standard strings?

Also what is more efficient DIMs or Strings?

Share this post


Link to post
Share on other sites

THank you Smoke'n. I think I did see something about this somewhare but It may have been VB (Which I have never used before) I will give this a try. It should be a little easier.

Also Do the Variables that will be used in there HAVE to be DIMs arrays or can they just be standard strings?

Also what is more efficient DIMs or Strings?

:)

Global/Dim/Local are declarations.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Yea I realized that shortly afterwards. DOH

Share this post


Link to post
Share on other sites

@jvnorris

Why do you think it is so much better ?

regards

ptrex

AHK Was unable to do everything that I wanted it to. ( I have some very old programs and AHK did not handle the controls right) AU3 handles almost any program I throw at it smashingly

AHK is built in an older language format and AU3 is closer to the language I am using for AI programming (Proprietary languange but similar to VB)

AU3 has a much better community concerned with more then creating bots.

AHK has too many security holes in it due to the Autoreplace feature and hterefor my company did not like it too much. They did not reject its use but anything i used it for had to go through alot more security then AU3.

AU3 has better documentation.

Scite specifically designed around AU3 and the other assisting programs that came with it enable me to do very rapid development of tools for work.

AU3 is almost an entire software development suite with te tools it comes with. AHK is just very lacking in good tools that work with it.

AHK just feels like a hack of the older AU2. Au3 actually looks and feels liek a professional language.

There is more but that covers the basics

Share this post


Link to post
Share on other sites

Scite specifically designed around AU3 and the other assisting programs that came with it enable me to do very rapid development of tools for work.

AU3 is almost an entire software development suite with te tools it comes with. AHK is just very lacking in good tools that work with it.

:)

AHK just feels like a hack of the older AU2.

It is...

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

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