Page 1 of 1
<br> in msg
Posted: 08 Feb 2008 18:12
by PeterH
Is it possible to add <br>-function (new lline) in script-command msg, to make a kind of formatted output?
And another thing: are not all sytem-variables supported in script? %path% is good, while %pathext% or %homepath% are not resolved.
Re: <br> in msg
Posted: 08 Feb 2008 18:20
by admin
1. yes
2. nobody ever asked for them
Posted: 08 Feb 2008 20:22
by PeterH
1. fine (very fine, to tell the truth)
2. that means I'm wrong, thinking something like that has been told long ago? (Not regarding sripting, I think - what could it have been?)
Would it be a problem to allow *any* defined sys.-var?
(In the moment I don't really need them - was just playing with scripts and making test-displays - with variables, msg-function and <br>, of course.)
Posted: 08 Feb 2008 20:52
by admin
PeterH wrote:1. fine (very fine, to tell the truth)
2. that means I'm wrong, thinking something like that has been told long ago? (Not regarding sripting, I think - what could it have been?)
Would it be a problem to allow *any* defined sys.-var?
(In the moment I don't really need them - was just playing with scripts and making test-displays - with variables, msg-function and <br>, of course.)
These are the ones I could add:
%CLIENTNAME%
%COMPUTERNAME%
%FP_NO_HOST_CHECK%
%HOMEPATH%
%NUMBER_OF_PROCESSORS%
%OS%
%PATHEXT%
%PROCESSOR_ARCHITECTURE%
%PROCESSOR_IDENTIFIER%
%PROCESSOR_LEVEL%
%PROCESSOR_REVISION%
%SESSIONNAME%
%USERDOMAIN%
%USERNAME%
I have not added them yet because they are no (full) paths. But I think with scripting it makes sense to add them, so I will.

Posted: 08 Feb 2008 21:08
by PeterH
Isn't there a chance to add all? Not explicit, but logically?
That is: if you find a %abc%, test if a sys-var exists, if yes: substitute. Would be most flexible - if I on my PC define such a variable I could use it - without asking you to add it

Posted: 08 Feb 2008 21:20
by admin
PeterH wrote:Isn't there a chance to add all? Not explicit, but logically?
That is: if you find a %abc%, test if a sys-var exists, if yes: substitute. Would be most flexible - if I on my PC define such a variable I could use it - without asking you to add it

Should be no problem...

Posted: 09 Feb 2008 22:39
by PeterH
As Don said: it was no problem.
For him
I have a little follow-up Problem: tried to make a list with ::msg, many lines, each with name of a var and then value of that var, both columns aligned by adding spaces between name and value. But the result isn't aligned! Is it possible the reason is just a proportinal font? (It seemed so easy, as edit has a fixed font...) If this is the reason forget it - I'll ask for selectable fonts in about 1 year
And by the way: could text in msgbox be made markable and copyable?
(In this case I would have copied a line to editor, to verify the number of spaces.)
Posted: 09 Feb 2008 22:59
by fishgod
PeterH wrote:And by the way: could text in msgbox be made markable and copyable?
(In this case I would have copied a line to editor, to verify the number of spaces.)
With a tool called "ShoWin 2.00" you can get any label oder window-property easly (I don't know where you can get it regularly, so I uploaded it
[read edit])
Drag the crosshair from the tool to the object with you would like to inspect, and lift your mouse-button, the information shown by ShoWin can be copied to clipboard via the "Copy"-button. Then insert it into notepad and count your spaces
//edit:: I never expected that it would be so easy to copy the text, so I deleted and removed the link in this posting
Posted: 10 Feb 2008 08:23
by admin
PeterH wrote:And by the way: could text in msgbox be made markable and copyable?
You also can copy the contents of any Windows Message Box using Ctrl+C.
But I planned such a markable and copyable version anyway. Not sure how to call the command (I don't want to add a parameter for it

). Maybe "textbox" or simply "text"? It will look like the Tips dialog in UDC but without the white top and in the same font you use for the list management editor (assuming you use a monospace font; at least I do)
Posted: 10 Feb 2008 10:52
by PeterH
admin wrote:You also can copy the contents of any Windows Message Box using Ctrl+C.
Thats a kind of implicit correlation: I could not mark, so I didn't try to copy
Now I tried Ctrl+C - the sound seemed to say "ERROR". Tried Ctrl+V in Edit though, and had positive result.
admin wrote:But I planned such a markable and copyable version anyway. Not sure how to call the command (I don't want to add a parameter for it

). Maybe "textbox" or simply "text"? It will look like the Tips dialog in UDC but without the white top and in the same font you use for the list management editor (assuming you use a monospace font; at least I do)
I don't understand what you want to say. 3 things: markable and copyable, monospaced font, and other command with other 'textbox'.
Ah - you say the win msgbox doesn't support all this, and you have to write an own version? But that would be no reason to use another cmd-name in XY, isn't it? OK - only reason: ::msg keeps proportional font, while new box with new could be monospaced?
A new box just for mark© should not be neccessary, as Ctrl+C is sufficient (for me). But maybe more advantages - like the used font?
Posted: 10 Feb 2008 10:59
by admin
PeterH wrote:admin wrote:You also can copy the contents of any Windows Message Box using Ctrl+C.
Thats a kind of implicit correlation: I could not mark, so I didn't try to copy
Now I tried Ctrl+C - the sound seemed to say "ERROR". Tried Ctrl+V in Edit though, and had positive result.
admin wrote:But I planned such a markable and copyable version anyway. Not sure how to call the command (I don't want to add a parameter for it

). Maybe "textbox" or simply "text"? It will look like the Tips dialog in UDC but without the white top and in the same font you use for the list management editor (assuming you use a monospace font; at least I do)
I don't understand what you want to say. 3 things: markable and copyable, monospaced font, and other command with other 'textbox'.
Ah - you say the win msgbox doesn't support all this, and you have to write an own version? But that would be no reason to use another cmd-name in XY, isn't it? OK - only reason: ::msg keeps proportional font, while new box with new could be monospaced?
A new box just for mark© should not be neccessary, as Ctrl+C is sufficient (for me). But maybe more advantages - like the used font?
Oh, the new command is very nice. Just finished it. I called it "text" for lack of a better idea. The dialog is bigger than msg, and the size does not adjust to the contents (but it has scrollbars). So I keep msg as it is for those small message bits.
Posted: 10 Feb 2008 11:34
by PeterH
...seems your programming is faster than my typing (in english)
Curious to see your 'text'...
Posted: 10 Feb 2008 13:11
by PeterH
...tested ::text - like it very much.
(Explicitely for alignment

)
Now I can mark© - but as the alignment is ok now, I don't need to
Is there a chance to make it resizable? (Not automatic, but by user?) In most cases size should be ok, but...
(I'm never satisfied, you know?)
And, still harder, a ::texta to append to currant data? No -
forget it: you can gather as much data as wanted in a variable, and present it as one text. No need to gather it elsewhere.
By the way: what's the limit of data length in one (and in all?) variables? Could this become a problem?
Posted: 10 Feb 2008 14:55
by admin
PeterH wrote:By the way: what's the limit of data length in one (and in all?) variables? Could this become a problem?
No limit (i.e. I think 2 or 4 GB). But the textbox shown by ::text can hold maximally 32 K.
Posted: 10 Feb 2008 15:10
by PeterH
admin wrote:No limit (i.e. I think 2 or 4 GB). But the textbox shown by ::text can hold maximally 32 K.
Thanks for the Info.
32k are about 1000 medium lines, or at least 100 very long lines - that's not too bad.
(I'll give you a note, when I've reached this - but it will last for some days

)