Hier wäre mein Code, bitte nicht lachen
Es geht darum nach einer gewissen zeit ein Programm zu starten.
Wobei man es auch stoppen kann(muss noch programmiert werden)
desshalb wollte ich 2 prozeduren nehmen
Code: Alles auswählen
Declare _Open_Window_0()
Declare _a()
#Window_0 = 0
#Image_0 = 1
#ProgressBar_2 = 2
#Button_0 = 3
#Text_2 = 4
;- Fonts
;
Global FontID1
FontID1 = LoadFont(1, "Arial", 12, #PB_Font_Italic)
;- Image Globals
Global Image0
;- Catch Images
Image0 = CatchImage(0, ?Image0)
;- Images
DataSection
Image0:
IncludeBinary "D:\HMI_FILES\program\L_HSR_03.bmp"
EndDataSection
Procedure _a()
Debug "atart delay"
Delay(5000)
Debug "start program"
RunProgram("d:\HMI_Files\script\protool.vbs","", "d:")
EndProcedure
Procedure _Open_Window_0()
If OpenWindow(0, 0, 0, GetSystemMetrics_(#SM_CXSCREEN), GetSystemMetrics_(#SM_CYSCREEN), #PB_Window_BorderLess | #PB_Window_ScreenCentered, "Borderless Window")
If CreateGadgetList(WindowID())
ImageGadget(#Image_0, 245, 160, 284, 95, Image0, #PB_Image_Border)
ProgressBarGadget(#ProgressBar_2, 245, 260, 288, 13, 0, 10)
ButtonGadget(#Button_0, 340, 310, 93, 35, "STOP !")
TextGadget(#Text_2, 245, 280, 291, 20, "Please wait, while machine is starting up!")
SetGadgetFont(#Text_2, FontID1)
EndIf
EndIf
AddKeyboardShortcut(0, #PB_Shortcut_Escape, 1)
Repeat : WaitWindowEvent() : Until EventMenuID() = 1
Debug "end"
EndProcedure