Add asterick to send as text

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
allenrobberson
Posts: 4
Joined: 03 Dec 2021, 16:29

Add asterick to send as text

Post by allenrobberson » 03 Dec 2021, 16:33

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
^+p::
Send, *******40 ft. ladder************{Enter}
*******40 ft. ladder************{Enter}
*******40 ft. ladder************{Enter}
****Rough Inspection? y******{Enter}
Trying to add this as a text to be place when using the CRTL SHIT P

but i get an error
image.png
image.png (9.83 KiB) Viewed 319 times

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Add asterick to send as text

Post by mikeyww » 03 Dec 2021, 16:42

Since you are showing only nine lines, I am not sure how you want the reader to debug line 11 in your script.

Continuation lines begin with punctuation. Otherwise, add a command.

Explained: Continuation sections
A line that starts with "and", "or", ||, &&, a comma, or a period is automatically merged with the line directly above it (in v1.0.46+, the same is true for all other expression operators except ++ and --).

allenrobberson
Posts: 4
Joined: 03 Dec 2021, 16:29

Re: Add asterick to send as text

Post by allenrobberson » 03 Dec 2021, 17:11

Code: Select all

Send, *******40 ft. ladder************{Enter}
*******40 ft. ladder************{Enter}
*******40 ft. ladder************{Enter}
****Rough Inspection? y******{Enter}
((Installation Scheduled)) {Enter}
## No Customer Confirmation Scheduling ##{Enter}
*Story -  2{Enter}
*MP -  1{Enter}
*kW -   4.08{Enter}
*PW -  2{Enter}
*Pitch -  20°{Enter} 
*Roof type - Low Profile W-Tile{Enter}
Job schedule for:{Enter} 
Estimated time needed for installation:12hrs{Enter}
Is interior access needed? y{Enter}
What are the owners obligations?n{Enter}
Installation will need:{Enter} 
MPU or MBD?n{Enter}
Rafter Upgrade or Blocking?n{Enter}
Rough Inspection? y{Enter}
Trenching?n{Enter}
Asbestos crew?n{Enter}
NEST?n{Enter}
HOA?n{Enter}
Additional Notes or Special Instructions added to work order: {Enter}
return

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Add asterick to send as text

Post by mikeyww » 03 Dec 2021, 17:15

This is explained in the link that I have already posted. For your script, method #2 is straightforward. If you do not need extra blank lines, you can eliminate the {Enter}.

Code: Select all

SendInput, {Text}
( RTrim0
*******40 ft. ladder************
*******40 ft. ladder************
*******40 ft. ladder************
****Rough Inspection? y******
((Installation Scheduled)) 
## No Customer Confirmation Scheduling ##
*Story -  2
*MP -  1
*kW -   4.08
*PW -  2
*Pitch -  20° 
*Roof type - Low Profile W-Tile
Job schedule for: 
Estimated time needed for installation:12hrs
Is interior access needed? y
What are the owners obligations?n
Installation will need: 
MPU or MBD?n
Rafter Upgrade or Blocking?n
Rough Inspection? y
Trenching?n
Asbestos crew?n
NEST?n
HOA?n
Additional Notes or Special Instructions added to work order: 
)
Return

allenrobberson
Posts: 4
Joined: 03 Dec 2021, 16:29

Re: Add asterick to send as text

Post by allenrobberson » 03 Dec 2021, 17:18

Sorry i dont understand. I am a newb at this

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Add asterick to send as text

Post by mikeyww » 03 Dec 2021, 17:24

OK. Using the bounding parentheses as shown is a way to refer to an entire block of text. The line breaks will be preserved. If you click the link marked "Continuation sections", more details are provided about the syntax as well as other options.

allenrobberson
Posts: 4
Joined: 03 Dec 2021, 16:29

Re: Add asterick to send as text

Post by allenrobberson » 03 Dec 2021, 17:28

Thanks all your help

Post Reply

Return to “Ask for Help (v1)”