Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

InputBox. (Found two undocumented tricks)...

1 view
Skip to first unread message

Benny Pedersen

unread,
May 20, 2002, 6:01:44 PM5/20/02
to

Hi,

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

Alex K. Angelopoulos (MVP)

unread,
May 20, 2002, 6:47:16 PM5/20/02
to
What are you seeing the AsLeft and AsUp do? I not only don't get anything see
anything on WSH 5.6, but the variables appear to be empty...

"Benny Pedersen" <b.ped...@get2net.dk> wrote in message
news:RteG8.1188$gr1....@news.get2net.dk...

Benny Pedersen

unread,
May 20, 2002, 8:10:35 PM5/20/02
to

"Alex K. Angelopoulos (MVP)" <a...@mvps.org> wrote news:uKuoDBFACHA.1828@tkmsftngp05...

> What are you seeing the AsLeft and AsUp do? I not only don't get anything see
> anything on WSH 5.6, but the variables appear to be empty...


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.

Michael Harris (MVP)

unread,
May 20, 2002, 8:48:23 PM5/20/02
to
Benny Pedersen wrote:
> Hi,
>
> 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.
>

??? 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
--

Torgeir Bakken

unread,
May 20, 2002, 9:13:16 PM5/20/02
to
Benny Pedersen wrote:

> 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


Greg Chapman (MS-MVP)

unread,
May 20, 2002, 9:29:01 PM5/20/02
to
I see them in the WSH5.6 help file too:

InputBox(prompt[, title][, default][, xpos][, ypos][, helpfile,
context])


Greg Chapman
MS-MVP

http://www.mousetrax.com
MouseTrax Computing Solutions

Benny Pedersen

unread,
May 22, 2002, 7:54:54 PM5/22/02
to

"Torgeir Bakken" <Torgeir.B...@hydro.com> wrote news:3CE99F2C...@hydro.com...

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

Torgeir Bakken

unread,
May 22, 2002, 9:48:58 PM5/22/02
to
Benny Pedersen wrote:

> 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


Benny Pedersen

unread,
May 23, 2002, 12:25:24 PM5/23/02
to

"Torgeir Bakken" <Torgeir.B...@hydro.com> wrote news:3CEC4A89...@hydro.com...

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

Torgeir Bakken

unread,
May 23, 2002, 3:34:07 PM5/23/02
to
Benny Pedersen wrote:

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


Benny Pedersen

unread,
May 23, 2002, 9:43:21 PM5/23/02
to

"Torgeir Bakken" <Torgeir.B...@hydro.com> wrote news:3CED442F...@hydro.com...

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).

0 new messages