Jump to content

Button help


Go to solution Solved by GroovyMan8750,

Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Solution

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...