bazza
(Lurker)
2002-02-08 06:20 PM
Logon splash screen.....

As a newbie to scipting, I wounder if anyone knows how to have a splash screen running at the sametime as the batch file in the background. I have it here were I work, & of course the scriptlogic, but surely one must be able to modify scriptlogic splash screen, or make there own with the batch (dos) login screen. Thanks

**DONOTDELETE**
(Lurker)
2002-02-09 05:10 AM
Re: Logon splash screen.....

You know, with ScriptLogic, you can instruct it to display your own bitmap...

If you want to do it without ScriptLogic (KiXtart alone), then perhaps you could use COM and launch IE to display a JPG or GIF or something?

Les
(KiX Master)
2002-02-09 04:30 PM
Re: Logon splash screen.....

I remember a similar request to this. Just a sec, while I search...

Ah, found it.
Show BMP or JPG....

Downside though is, you need to make kixwin.exe available to everyone. I'm not knocking kixwin, just trying to do it without.

I'm trying to learn COM, (not very sucessful though) and I thought I'd give that a go. Ran into a few snags.

Can't figure out how to get IE in kiosk mode. you know, no menus, no buttons, no status.

When the window tries to close itself with the timeout code in the htm file, IE prompts if it's OK.

Guess it's time to send out the signal.
Paging Super COM Boy...

[ 09 February 2002: Message edited by: LLigetfa ]

Les
(KiX Master)
2002-02-09 05:00 PM
Re: Logon splash screen.....

OK, so I don't know what I'm saying...
Forget kiosk mode, wrong terminology.
Maybe this can be achieved within the html document itself. Damn, not any better at html than COM...

You know, Jack of all, master of none...

Les
(KiX Master)
2002-02-09 06:40 PM
Re: Logon splash screen.....

Eh, Super COM Boy... are you going to throw me a hint... or do you take pleasure in my flailing?

Using JavaScript, I'd do something like the following between script tags:
Offsite=window.open("http://intranet.ff.abicon.com",
"Offsite","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=0,width=900,height=580");window.focus();
(Not sure how much of this code UBB will allow but will try)

So, can the same be done with COM?

ShawnAdministrator
(KiX Supporter)
2002-02-09 08:10 PM
Re: Logon splash screen.....

Super COM boy ? rofl

I got something that might make us a good start ... but it's got lots of less-than signs in it ... do you still have that link of Rogier's had for pre-formatting post for HTML forums ? No what I mean ?

-Shawn

Les
(KiX Master)
2002-02-09 09:21 PM
Re: Logon splash screen.....

Shawn,
OK, I'll bite. Are you talking about PostPrep because if it is, I don't understand.

Damn that Brian anyway, for throwing down the gauntlet like that!

ShawnAdministrator
(KiX Supporter)
2002-02-09 09:36 PM
Re: Logon splash screen.....

Yeah, postprep, i just didn't feel like handjobbing all the < signs ...

Here's a rough start. It's a UDF that displays an IE splash screen complete with title, picture and message ... it floats around during script and goes away at the end ...


break on


$company = "Acme Inc."
$picture = "http://kixtart.org/board/bbtitle5.jpg"
$message = "Please be patient while your login script executes"


$Splash = Splash($company,$picture,$message)

?"Mapping drives ..." sleep 1

?"Poking the registry ..." sleep 3

?"Puring temp internet cache ..." sleep 1

?"Done!" sleep 1

$Splash.Quit()
$Splash = 0

exit


function Splash($company,$picture,$message)
 dim $ie
 $ie = createobject("internetexplorer.application")
 $ie.menubar = 0
 $ie.statusbar = 0
 $ie.toolbar = 0
 $ie.width = 200
 $ie.height = 250
 $ie.navigate("about:blank")
 while $ie.busy and $ie.readystate <> 4 and @error = 0 loop
 $html="
 <html>
 <head>
 <title>$title</title>
 </head>
 <body scroll=no>
 <img src='$picture'>
 <center><h3>$message</h3></center>
 </body>
 </html>
 "
 $ie.document.write($html)
 $ie.visible = 1
 $Splash = $ie
endfunction


-Shawn

Les
(KiX Master)
2002-02-09 10:01 PM
Re: Logon splash screen.....

Like you said... it's a start. Not looking a gift horse in the mouth... just trying to learn.

So where are the interface property methods documented? Didn't try this in a logon script, but when run from the desktop on Win2K, focus doesn't change (it's a feature) to the IE window as kixwin does. I know I could kludge it with SetFocus() but would rather not.

ShawnAdministrator
(KiX Supporter)
2002-02-09 10:59 PM
Re: Logon splash screen.....

Les,

The interface methods and properties are on MSDN, here's one link here:

HTML and DHTML Reference

In terms of setting focus - you nailed it - the only way I know of is to use kix'x setfocus, suggest putting in a retry counter so one doesn't loop to infinity, right after the make visible in the UDF ...


 $ie.visible = 1
$retry = 5 ; seconds
while setfocus("$title") and $retry
$retry=$retry-1
sleep 1
loop

Something like that anyways ... this COM stuff is kinda fun isn't it ?

-Shawn

[ 09 February 2002: Message edited by: Shawn ]

ShawnAdministrator
(KiX Supporter)
2002-02-09 11:37 PM
Re: Logon splash screen.....

I thought this might make for a more professional login splash screen ...


break on


$splash = funkysplash("Logoff before it's too late!",200,300,500,200)


exit 1


function funkysplash($message,$left,$top,$width,$height)

 dim $ie,$dacontrol,$m,$half,$clr
 dim $font,$txtimg,$pos,$scl,$xf
 dim $retry

 $ie = createobject("internetexplorer.application")
 $ie.menubar = 0
 $ie.statusbar = 0
 $ie.toolbar = 0
 $ie.left = $left
 $ie.top = $top
 $ie.width = $width
 $ie.height = $height

 $ie.navigate("about:blank")
 while $ie.busy and $ie.readystate <> 4 and @error=0 loop

 $html =
 '<html><title>Funky</title><body scroll=no></body></html>'+
 '<'+'OBJECT ID="DAControl" STYLE="position:absolute; left:0; top:0;width:$width;'+
 'height:$height;z-index: -1" CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D"'+'>'+
 '<'+'/OBJECT'+'>'

 $ie.document.write("$html")

 $ie.visible = 1
 sleep 1
 $retry = 5 ; seconds
 while setfocus("Funky") and $retry
  $retry=$retry-1
  sleep 1
 loop

 $dacontrol = $ie.document.all("dacontrol")
 $m = $dacontrol.meterlibrary
 $half = $m.danumber("0.5")
 $clr = $m.colorhslanim($m.mul($m.localtime, $m.danumber("0.345")),$half, $half)

 $font = $m.font("Arial", 11, $clr)
 $txtimg = $m.stringimage("$message", $font)

 $pos = $m.mul($m.sin($m.localtime), $m.danumber("0.02"))
 $scl = $m.add($m.danumber("2"), $m.abs($m.mul($m.sin($m.localtime), $m.danumber("3"))))
 $xf = $m.compose2($m.translate2anim($m.danumber("0"), $pos), $m.scale2uniformanim($scl))
 $txtimg = $txtimg.transform($xf)

 $dacontrol.image = $txtimg
 $dacontrol.start

 $funkysplash = $ie

endfunction


-Shawn

Les
(KiX Master)
2002-02-10 12:24 AM
Re: Logon splash screen.....

Thanks Shawn,
I,m a lot humbler and a little wiser now. Yeah this COM stuff is fun and I like extending KiX without having to install custom DLLs. Yeah, I understand that there are external dependencies with COM, but they are the standard stuff that can be easily managed in a corporate environment.

Maybe what we should have is a handy index of the interface property methods (or links to) of commonly used objects posted in the COM forum.

ShawnAdministrator
(KiX Supporter)
2002-02-10 12:36 AM
Re: Logon splash screen.....

Hey, that's a great idea !

I'll see what links I can dig up and post them asap ... the MSDN links are a bit of a moving target because MS is always monkeying with their web sites (don't you hate that?) ... yeah - good idea !

-Shawn

Les
(KiX Master)
2002-02-10 01:08 AM
Re: Logon splash screen.....

Yeah, damn those changing links...
I often try to include the search criteria I used to find something. You know, the "teach a man to fish" concept. That would would work except M$ keeps changing how their search works too!
Speaking of search, have you noticed Google now has a Canadianized option?


ShawnAdministrator
(KiX Supporter)
2002-02-10 01:17 AM
Re: Logon splash screen.....

changing links - i was just "venting" a little bit there - we won't let that stop us from creating a listing of COM link though ...

The Canadian google - yeah - i saw that - I wonder what the difference is ? The only thing I could see different was that all the search link titles end with "eh?"

-Shawn

Les
(KiX Master)
2002-02-10 01:21 AM
Re: Logon splash screen.....

Hope it works better than Yahoo.ca's so called Canadian sites search.
/rant off ;just in case


ShawnAdministrator
(KiX Supporter)
2002-02-10 02:30 AM
Re: Logon splash screen.....

You know what - the postprep really works great - im going to use it for going forward forever ... thanks for the link eh ! ... Watching the Olympics ?

-Shawn

Les
(KiX Master)
2002-02-10 02:38 AM
Re: Logon splash screen.....

Yeah, it's a great tool. Not just for those wanting to post code but also for those that rip the code. No more of that copy/paste-to-word/cut/paste thingy.
I tried to convince Rogier in the thread A new way of posting to this forum to include a link to PostPrep in Guidelines for the UDF-section but my suggestion died there.


Netsuper
(Getting the hang of it)
2002-02-22 08:15 AM
Re: Logon splash screen.....

by adding:

$ie.fullscreen = 1

before:

$ie.menubar = 0

will set the fullscreen property but the width and height coming after will restrict it back to those parameters. It will then be the size you want with no borders.

cj
(MM club member)
2002-02-25 09:56 AM
Re: Logon splash screen.....

Is it just me, or has the board changed? I can C&P straight from the visible code and is is formatted!

Les said "Maybe what we should have is a handy index of the interface property methods (or links to) of commonly used objects posted in the COM forum."

I have a program I linked to on my Downloads page called TLBDOC. It will list the properties, methods, functions etc of a .DLL or .OCX file. It works with SCRRUN.DLL (Windows Scripting Host) and Shawn's cool KiX addons. Shawn may be able to tell you what the DLL must have for this to work.

If you look on my Add-ons page you will see an addon called JMail and I have included the .HLP file created by TLBDOC too.

Start here

cj

p.s. Just realised that TLBDOC is not on my site, gimme a few minutes to pop it on the downloads page.