MsgBox with forced expression and custom title Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
john_c
Posts: 493
Joined: 05 May 2017, 13:19

MsgBox with forced expression and custom title

09 Apr 2018, 19:34

It works:

Code: Select all

MsgBox,, Title, Text
Also works:

Code: Select all

var := "Text"
MsgBox % var
Now I want to use forced expression and specify custom window title at the same time.
Is it possible? (The code here doesn't properly work).

Code: Select all

var1 := "Text"
var2 := "Title"
MsgBox % var1, var2
donovv
Posts: 108
Joined: 15 Apr 2017, 21:06

Re: MsgBox with forced expression and custom title

09 Apr 2018, 19:55

msgbox,,%var2%,% var1
the title for msgbox is before the text
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: MsgBox with forced expression and custom title  Topic is solved

09 Apr 2018, 21:21

Here's an example where both parameters use forced expressions. Cheers.

Code: Select all

q:: ;MsgBox demo
vText := "My Text"
vTitle := "My Title"
MsgBox,, % vTitle, % vText
MsgBox,, % "My Title", % "My Text"
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
john_c
Posts: 493
Joined: 05 May 2017, 13:19

Re: MsgBox with forced expression and custom title

10 Apr 2018, 06:58

@jeeswg Excellent, thanks! :-)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 377 guests