| View previous topic :: View next topic |
| Author |
Message |
Leef_me
Joined: 08 Apr 2009 Posts: 5333 Location: San Diego, California
|
Posted: Thu Oct 01, 2009 7:25 pm Post subject: Help formatting a MsgBox statement |
|
|
I apologize for the /lame/ example, also for the long post but trivial question.
Using msgbox, I attempt to continue the line but I see the . character which I do not want.
I do understand some methods to continue script lines, and I know this works:
http://www.autohotkey.com/docs/Scripts.htm#continuation
| Code: | ; EXAMPLE #1:
Var =
(
Line 1 of the text.
Line 2 of the text. By default, a linefeed (`n) is present between lines.
)
msgbox %var% |
Is there a way to rewrite the MsgBox below without changing to the above style/method?
| Code: | #SingleInstance force
return
#q::
WinGetActiveTitle, Title
ControlGetFocus, OutputVarFoc , %Title%
MouseGetPos, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl
WinGetTitle, Mtitle, ahk_id %OutputVarWin%
MsgBox, The active window is "%Title%!`nfocus!%OutputVarFoc%!`nx=!%OutputVarX%!`ny=!%OutputVarY%!
. `nid=!%OutputVarWin%!`nctl=!%OutputVarControl%!`nmouse_win!%Mtitle%!
|
|
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Thu Oct 01, 2009 8:05 pm Post subject: |
|
|
| Code: | MsgBox,% "The active window is " Title "!`nfocus!" OutputVarFoc "!`nx=!" OutputVarX "!`ny=!" OutputVarY
. "!`nid=!" OutputVarWin "!`nctl=!" OutputVarControl "!`nmouse_win!" Mtitle "!" |
|
|
| Back to top |
|
 |
Roland
Joined: 08 Jun 2006 Posts: 307
|
Posted: Thu Oct 01, 2009 8:07 pm Post subject: |
|
|
| Code: | MsgBox,
( join
The active window is "%Title%!`nfocus!%OutputVarFoc%!`nx=!%OutputVarX%!`ny=!%OutputVarY%!
`nid=!%OutputVarWin%!`nctl=!%OutputVarControl%!`nmouse_win!%Mtitle%!
) |
? |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 5333 Location: San Diego, California
|
Posted: Thu Oct 01, 2009 8:58 pm Post subject: |
|
|
thank you both. Just what I was looking for.
@ jaco0646 you lost my double-quote!  |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Thu Oct 01, 2009 9:59 pm Post subject: |
|
|
| Code: | MsgBox,% "The active window is """ Title "!`nfocus!" OutputVarFoc "!`nx=!" OutputVarX "!`ny=!" OutputVarY
. "!`nid=!" OutputVarWin "!`nctl=!" OutputVarControl "!`nmouse_win!" Mtitle "!" |
|
|
| Back to top |
|
 |
|