ผมทำโปรแกรมตัวหนึ่งเอาไว้ รันโปรแกรมอื่น
code
While 1
$file = InputBox("Run","Name Process","","", 250, 120)
If @error Then
Exit
Else
If $file <> "" Then
ShellExecute($file)
Exit
Else
MsgBox(0,"error","Name Process")
EndIf
EndIf
sleep(10)
WEnd
เวลาใช้งานไม่มีปัญหาเช่น สั่งรัน
calc.exe
notepad.exe
เมื่อคำสั่งทำงานเสร็จโปรแกรมจะปิดทันที
แต่ถ้าสั่งรันไปเครื่องอื่นเช่น \\10.138.xx.xx
ได้แล้ว
แต่ตัว process ยังทำงานอยู่เลย
ไม่รู้เหมือนกัน
อาจต้องเปลี่ยนเป็น ShellExecuteWrite
หรือต้องใส่คำสั่ง
$x1 = @ScriptName
If ProcessExists($x1)
ProcessClose($x1)
EndIf
เพิ่มลงไป
ขอคำแนะนำหน่อยครับ
code
While 1
$file = InputBox("Run","Name Process","","", 250, 120)
If @error Then
Exit
Else
If $file <> "" Then
ShellExecute($file)
Exit
Else
MsgBox(0,"error","Name Process")
EndIf
EndIf
sleep(10)
WEnd
เวลาใช้งานไม่มีปัญหาเช่น สั่งรัน
calc.exe
notepad.exe
เมื่อคำสั่งทำงานเสร็จโปรแกรมจะปิดทันที
แต่ถ้าสั่งรันไปเครื่องอื่นเช่น \\10.138.xx.xx
ได้แล้ว
แต่ตัว process ยังทำงานอยู่เลย
ไม่รู้เหมือนกัน
อาจต้องเปลี่ยนเป็น ShellExecuteWrite
หรือต้องใส่คำสั่ง
$x1 = @ScriptName
If ProcessExists($x1)
ProcessClose($x1)
EndIf
เพิ่มลงไป
ขอคำแนะนำหน่อยครับ