Page 1 of 1 1
Topic Options
#13011 - 2001-10-09 06:13 PM Show BMP or JPG....
Anonymous
Unregistered


Is there a way to display a bmp or jpg in the console window (probably not is my guess).

If not, can i have a jpg or bmp pop up on the screen for a few seconds and then go away?

Thanks All!

Top
#13012 - 2001-10-09 06:38 PM Re: Show BMP or JPG....
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Cropper ,

Welcome.

May I point you to cj's homepage ?
there's an exe in the KiXtart section that shows a picture (with ok button, or w/o)

cj's page


Jochen

_________________________



Top
#13013 - 2001-10-09 06:47 PM Re: Show BMP or JPG....
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Then there's KiXWin AKA KiXPop.
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=003191
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13014 - 2001-10-09 08:59 PM Re: Show BMP or JPG....
Anonymous
Unregistered


Unfortunately, that all requires DHTML programming knowledge of which I have none (I am not a programmer at all really, just starting out with KIX). I was just hoping there was an easy way to call a simple bmp or jpg, hold it there for a few seconds and then kill it.
Top
#13015 - 2001-10-09 11:09 PM Re: Show BMP or JPG....
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
EH! if you're looking for easy, then you're in the wrong biz! It's not rocket science, just some very basic html.

Test.KiX

code:

Break on

$arguments = "$prompt;$default;$ok;$cancel"
$style = "dialogWidth:800px;dialogHeight:300px;help:no;scroll:no;bgcolor=teal"

run '%comspec% /c C:\KiXUtils\KixPop\kixwin "file://"C:\KiXUtils\KixPop\test.htm"" "$arguments" "$style" '
Sleep 5
$ = SetFocus("Test Page")
SendKeys("~{F4}Y")

get $


Test.HTM

code:

<html><head><title>Test Page</title></head>
<body>
<img src="C:\KiXUtils\KixPop\PASSWORD.JPG">
</body>
</html>


_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13016 - 2001-10-10 12:50 AM Re: Show BMP or JPG....
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey Les,

Pretty darn good for a "teach a man to fish" kinda guy ... here's another (even simpler) flavor of the olde kixpopper "splash screen" ... it displays a jpeg for 5 seconds (timer set in the body onload tag) ...

In order to post this HTML snippet, I had to change the onload statement to onloadXXX, if you decide to try it, please rename it back to just onload.

TEST.KIX

code:

break on
run '%comspec% /c kixwin "file://c:\test.htm"'
exit

TEST.HTM

code:

<html>
<head>
<title>Test Page</title>
</head>
<body onloadXXX="setTimeout('timeout()',5000);" scroll=no>
<img src="C:\PASSWORD.JPG">
</body>
</html>
<script>
function timeout()
{
window.close();
}
</script>

-Shawn

Top
#13017 - 2001-10-10 05:06 AM Re: Show BMP or JPG....
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Shawn,
Thanks for that. I knew there was a way to do it from the page without sendkeys, but I was being hasty. In fact, I pondered looking up the code but figured someone would one-up me anyway.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13018 - 2001-11-06 05:47 AM Re: Show BMP or JPG....
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Those programs are on the downloads page and I probably should put some usage information nearby

basically:

ShowPic x:\path\filename.bmp

and that's it. If you want it to close after a few seconds just use SLEEP and KILL or SETFOCUS/SENDKEYS("~{F4}")

KiX:

SHELL "%comspec% /c showpic1 c:\winnt\lanma256.bmp"
SLEEP 5
SHELL "%comspec% /c kill -f showpic1.exe"

or

SLEEP 5
while SETFOCUS("showpic")<>0 loop
SENDKEYS("~{F4}")

cj

p.s. that code is from memory, let me know if it is wrong.

Top
#13019 - 2002-02-13 09:43 AM Re: Show BMP or JPG....
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
I have moved these files to here: showpic1.exe showpic2.exe

enjoy

cj

Top
#13020 - 2002-02-14 05:29 PM Re: Show BMP or JPG....
Hill PHOENIX Offline
Fresh Scripter

Registered: 2001-11-19
Posts: 5
Loc: Conyers,Ga
I have the same problem as the original poster. However, using this script, "shell "%comspec% /c showpic1 \\con1\netlogon\kixsafety.bmp" I have managed to get SOME of my client computers to display our safety bmp. (XP, and 2K seem to work OK. However, some NT 4.0 boxes still have the problem.) I also tried to run shell "%comspec% /c showpic1 \\con1\netlogon\kixsafety.bmp"
sleep 5
shell "%comspec% /c kill -f showpic1.exe", but received an error saying unknown command "kill".

My problem is, none of the Win98 machines will display the bmp. What gives? I tried shelling out to a bat file calling the bmp, but that didn't work either. ("%comspec% /c \\con1\netlogon\kixsafety.bat.) In the bat file, I had "\\con1\netlogon\safety.bmp")

Any thoughts as to why this isn't working? Besides me being a terrible programmer?

Hill PHOENIX

My thanks to cj, member #677 for the scripts!

PS, we, my company, wants to display a safety message during the logon script, hence my inquiry

Top
#13021 - 2002-02-14 06:48 PM Re: Show BMP or JPG....
andreas Offline
Lurker

Registered: 2002-02-14
Posts: 1
Loc: de knipe
Hello guys,
where can i found kixwin ?

greetings Andreas

Top
#13022 - 2002-02-14 06:54 PM Re: Show BMP or JPG....
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
http://kix.isorg.net/kix_tools/KixPop.zip
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#13023 - 2002-02-18 03:32 PM Re: Show BMP or JPG....
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Kill is an NT resource kit utility. ShowPic was written a long time ago and I think there are better ways to do this. I, personally, would go with COM/OLE and IE, but other addons like KiXWin and VBWin will do this.

cj

Top
#13024 - 2002-02-25 10:57 PM Re: Show BMP or JPG....
Anonymous
Unregistered


Shawn!!

Hey can you tell me how to make your code shown above make IE go full screen.

I'm looking to make the logon splash screen go full screen.

Thanks in advance.

Top
#13025 - 2002-02-26 02:05 AM Re: Show BMP or JPG....
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Have a look here and here.

cj

Top
#13026 - 2002-02-26 07:12 AM Re: Show BMP or JPG....
Anonymous
Unregistered


Thanks CJ Gonna go see if this stuff works with kix ver 3.63 now.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.069 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org