Page 1 of 1 1
Topic Options
#91635 - 2003-02-28 08:15 AM PowerPoint.application
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Can anyone help me with this com thingie??

What I want:

  • start a "master"-ppt as a continues slideshow
  • during show check for existence of updated "master"-ppt in a specific dir
  • if exist then load a "busy updating"-ppt, put this to the foreground and stop the "master"-ppt
  • Update the "master"-ppt
  • if copy done then load the "master"-ppt, put this to the foreground and stop the "busy updating"-ppt
Question is how to start the ppt as a slide show. All I know is to create an object with createobject(PowerPoint.application) and that's it.
Now to load a ppt and play it...
Any reference to information is welcome too!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#91636 - 2003-02-28 01:40 PM Re: PowerPoint.application
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
Patrick,

This is all I can find. Hope it helps at least a little.

Microsoft Docs

-Eric
_________________________
Eric

Top
#91637 - 2003-02-28 03:07 PM Re: PowerPoint.application
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Eric,

saw that docu too... Didn't help me much (not possible to open 2 instances of powerpoint...)

So I solved it in an other way:

code:
;****************************************************************************
;
;SCRIPT : HALVIEWER.KIX
;
;AUTHOR : Patrick Rutten (MightyR1@hotmail.com)
;
;CONTRIBUTORS :
;
;ACTION : Runs a PPS and checks for update
; if update found, kill PPS, copy update, run new PPS
;
;SYNTAX : HALVIEWER.KIX
;
;VERSION : 1.0 - Initial release
;
;PARAMETERS : -
;
;REMARKS : -
;
;RETURNS : -
;
;DEPENDENCIES : WMI, Powerpoint, KIX32, hidetbar.exe
;
;KIXTART VER : 4.20
;
;EXAMPLE(S) : -
;
;KNOWN ISSUES : -
;
;****************************************************************************
;
;
Break on
$rc=SetOption("Explicit","On")

;Declare Vars
Dim $rc, $masterpps, $updatepps, $hidetbar, $runcmd, $startcmd
Dim $sleeptime, $copytime, $killtime, $runpps

$masterpps=@scriptdir+'\master.pps'
$updatepps=@scriptdir+'\update.pps'
$hidetbar=@scriptdir+'\hidetbar.exe'
$runcmd='Run "%comspec% /c '
$startcmd='Run "%comspec% /c start '
$sleeptime=30
$copytime=3
$killtime=3
$runpps=1

;Hide Taskbar
$rc=Execute("$runcmd $hidetbar chr(34)")

;infinite loop
While 1
Sleep $sleeptime

;if update found: kill current, copy new, delete new
If Exist($updatepps)
$rc=wmikill("Powerpnt.exe")
Sleep $killtime
Copy $updatepps $masterpps
Sleep $copytime
Del $updatepps
Sleep $killtime
$runpps=1
EndIf

;if runflag is 1 then start the pps
If $runpps
$rc=Execute("$startcmd $masterpps chr(34)")
$runpps=0
EndIf
Loop
Exit 0

Function WMIKill($proc_to_kill,optional $computer)
Dim $wmistring, $wmi, $process, $processes, $kill
If NOT $computer $computer = @WKSTA EndIf
$wmistring = "winmgmts:{impersonationlevel=impersonate}!//" + $computer
$wmi = GetObject($wmistring)
If $wmi
$processes = $wmi.instancesof("win32_process")
For Each $process In $processes
If $process.name = $proc_to_kill
$kill = $process.terminate(0)
If @ERROR = 0
$wmi = 0
Exit 0
Else
$wmi = 0
Exit 1
EndIf
EndIf
Next
Else
Exit 2
EndIf
EndFunction

I made the desktop black, no Icons and used an "updating.bmp" as image.

Now I can start the pps (no createobject since it flashes powerpoint), sleep and check for update (manually copied by a cmd file). If exist, kill powerpnt.exe (shows black desktop with updating.bmp), copy update and start all over again...

Now to get rid of the mouse pointer...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#91638 - 2003-02-28 10:50 PM Re: PowerPoint.application
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
pat, dear sweet mama!

so you are asking for slideshow?

see that my page is almost same as the link above...

basically, could you do, show slides and on every round check for the file and if exist load without separating update note...

as far as I see, it's possible allthough it takes little time to convert those scripts to kix.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.03 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