I'm trying to learn this WSH. I plan to learn about 20 new VBS
functions per day the next week or so.
While I was examing the posibilities of
the Hex and the Oct functions, I found two undocumented arguments
for the InputBox, namely the below AsLeft and AsUp
arguments? Hmmm, see label Hex below.
Benny Pedersen, http://2dos.homepage.dk/
BTW. I couldn't get the HLP file argument to work in the matter of reading a file.
Maybe someone know a HLP file which can be found on Win98 along with a syntax
example ???
'InputBox
Dim Input
Input = InputBox _
(_
"Prompt" &vbCrLf &_
"Prompt" &Chr(10) &_
"Prompt" &Chr(13) &_
"Prompt" &Chr(10) &Chr(13) &_
"Prompt", "Title", "Default", 800, 1600, "X",0 _
)
If not Input = Blank then MsgBox "You entered: " & Input
wscript.quit
'Hex
Dim MyDec, MyHex
MyDec = 2147483647
MyHex = Hex(MyDec)
InputBox MyDec,,MyHex,AsLeft,AsUp' 7FFFFFFF
msgbox Hex(1.49) '1
msgbox Hex(1.50) '2
msgbox Hex(blank) '0
msgbox &h10 +1 '17
'Oct
inputbox Oct(2147483647),""
msgbox Oct(1.49) '1
msgbox Oct(1.50) '2
msgbox Oct(blank) '0
msgbox &o10 +1 '9
"Benny Pedersen" <b.ped...@get2net.dk> wrote in message
news:RteG8.1188$gr1....@news.get2net.dk...
Yes, I just used two words (AsLeft and AsUp) as empty variables but the two
words as said, simply placed the box to the left and up instead as usual.
Benny.
??? undocumented ???
I don't know about you, but my vbscript docs do document the 3rd & 4th arguments as xpos and ypos respectively as taking positioning values in twips ...
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
> BTW. I couldn't get the HLP file argument to work in the matter of reading a file.
> Maybe someone know a HLP file which can be found on Win98 along with a syntax
> example ???
Hi
InputBox "Test to load a helpfile",,,,, "c:\windows\help\conf.hlp", 26125
Note that only .hlp (the older WinHelp format) is supported.
--
torgeir
InputBox(prompt[, title][, default][, xpos][, ypos][, helpfile,
context])
Greg Chapman
MS-MVP
http://www.mousetrax.com
MouseTrax Computing Solutions
Thanks!
' InputBox "Test to load a helpfile",,,,, "c:\windows\help\conf.hlp", 26125
InputBox "Test to load a helpfile",,,,, "K.HLP", 0
wscript.quit
I couldn't find the Conf.hlp file but I found another HLP file
working as this:
InputBox "Test to load a helpfile",,,,, "K.HLP", 0
But since such syntax only is working with old HLP files and since wee
can't create a HLP file our self, then the "InputBox HLP file argument"
maybe useless.
But if it was possible to create a HLP file, something like this:
0 blah
1 blah blah
and so on..., then it maybe useful. So, based on my K.HLP file and
with use of http://2dos.homepage.dk/batutil/NEWS8.HTM#cscr
I then tried to figure out how such HLP file should be constructed.
I truncated the HLP file until it only contents some few bytes but
Windows just said that the HLP file was bad. Hmmm.
Benny Pedersen,
BTW. Here's a funny one, just created:
' Nested objects
A="ABC"
B=ucase("abc")
C="dos"
D=lcase("DOS")
select case ( -((A)=(B)) & -((C)=(D)) ) +100
case 110 msgbox "[A=B]"
case 101 msgbox "[C=D]"
case 111 msgbox "[A=B] and [C=D]"
case 100 msgbox "[A isn't B] and [C isn't D]"
case else msgbox "OOPS!"
end select
> But since such syntax only is working with old HLP files and since wee
> can't create a HLP file our self, then the "InputBox HLP file argument"
> maybe useless.
>
> But if it was possible to create a HLP file, something like this:
For help file creation (both old and new type), take a look here
http://www.helpmaster.com/index.htm
It was with a help decompiler from this site I found the the Help context number 26125 for
conf.hlp
> BTW. Here's a funny one, just created:
>
> ' Nested objects
>
> A="ABC"
> B=ucase("abc")
>
> C="dos"
> D=lcase("DOS")
>
> select case ( -((A)=(B)) & -((C)=(D)) ) +100
> case 110 msgbox "[A=B]"
> case 101 msgbox "[C=D]"
> case 111 msgbox "[A=B] and [C=D]"
> case 100 msgbox "[A isn't B] and [C isn't D]"
> case else msgbox "OOPS!"
> end select
Cool :-)
--
torgeir
Thanks!
After I installed the hcw403 (Help Work Shop), then
I could open a decompiled HPJ file by a double click.
I then double clicked an item in section [MAP] and
all numbers which could be used as an argument for
the InputBox was displayed :-)
But it was a jungle to figure out and the HELPDECO.EXE
decompiler didn't work at once.
Benny Pedersen,
PS. A drag & drop interface for decompiling.
Since I can't write it as a VBS file, I then
wrote it as a batch file, (file extension = BAT),
@echo off
if not exist "%1" for %%c in (echo goto:eof) do %%c. Drag & drop ?.HLP
if not exist "%0" goto decompiler
REM Location of HELPDECO.EXE:
c:
cd "\HLP Decompiler\helpdc21"
if not exist work\nul md work
cd work
%comspec%/c%0:decomp %1>decompiler.log
REM Herbert Kleebauer, Fakultaet Informatik, Universitaet BW Muenchen,
REM COM source: http://2dos.homepage.dk/batutil/help/FDISK_E.HTM
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=> ~.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU!WvX0GwUY Wv;ovBX2Gv0ExGIuht6>>~.com
echo ?A}IKuNWKg}1\H?w?FgFwjh[thAtg?_QFw?GAC~AHOpeIe=b?GCooAt`EE>>~.com
echo _SFDGQs_{O=HAwtH}1nHgzLDFBFFISXxJt]?sECyFGVhAozxHmL?@opB`K>>~.com
echo EFZNUAAo}H@SuN1_{ECCRqoCvx{OokN?IZjLFB@{AAE?j@wre~aN@AA_?W>>~.com
echo zBzBu`B?WoB??o0>> ~.com
echo._>>decompiler.log
~ 0 24>>decompiler.log
del ~.com
cls
goto eof
:decompiler
..\HELPDECO.EXE %1 /y
:eof
I can't see why you need to learn WSH ;-)
Benny, Benny. There is something familiar with that name. Ahh, you are the inventor of
BennyLevel!
--
torgeir
Yes, as closely written in magazines, at the time, I was
the first person from Denmark who got something named in
the Computer Age but I didn't know that you "VBS people"
was aware of that. ;-)
Benny Pedersen,
PS. Along with an updated batch file, I have now uploaded
some of our "InputBox topic" here:
http://users.cybercity.dk/~bse26236/batutil/NEWS8.HTM#bat
(A link to the UseNet "Torgeir Bakken" is included at the
bottom of the above section).