Page 1 of 1

Add asterick to send as text

Posted: 03 Dec 2021, 16:33
by allenrobberson

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 340 times

Re: Add asterick to send as text

Posted: 03 Dec 2021, 16:42
by mikeyww
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 --).

Re: Add asterick to send as text

Posted: 03 Dec 2021, 17:11
by allenrobberson

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

Re: Add asterick to send as text

Posted: 03 Dec 2021, 17:15
by mikeyww
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

Re: Add asterick to send as text

Posted: 03 Dec 2021, 17:18
by allenrobberson
Sorry i dont understand. I am a newb at this

Re: Add asterick to send as text

Posted: 03 Dec 2021, 17:24
by mikeyww
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.

Re: Add asterick to send as text

Posted: 03 Dec 2021, 17:28
by allenrobberson
Thanks all your help