Sign in to follow this  
Followers 0
GroovyMan8750

Button help

3 posts in this topic

I'm want to open a ppt/pps file in presentation mode from a button on a multi-button GUI. Trying to find resource info is killing me. Please help.

I am using Win 7 32bit

Here is what I have been playing with.....

$Ok_Button452 = GUICtrlCreateButton("MY Jeopardy", 10, 90, 200, 25)
GUICtrlSetOnEvent($Ok_Button452, "Ok_Button452")
GUICtrlSetFont(-1, 8, 700, 1, "times new roman")
Func Ok_Button452()
         _IECreate("serversubfolderMy Jeopardy.pps")     
         ;Run(@comSpec & "/c start C:Program FilesMicrosoft OfficeOffice14powerpnt.exe", serversubfolderMy Jeopardy.ppst , @SW_MAXIMIZE)
 EndFunc   ;==>Ok_Button452

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Why are you doing an _IECreate?? Why not something like this?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

GUICreate("Test", 300, 300)
$gobtn = GUICtrlCreateButton("Go", 10, 10, 30, 30)

GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            case $gobtn
                ShellExecute(@ScriptDir & "\Jeopardy.pps")
        EndSwitch
    WEnd

GUIDelete()
Edited by JLogan3o13

When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

I have been trying a multitude of things....._IECreate at least allows the file to open after a bit...

After pulling my head out.....I got it. I had to add the secondary folder location in front of the file to execute. I'm such a tool!

 

Thanks for the assist!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0