import { Frame } from "puppeteer-core" ; import { BaseTask , ScriptSetting } from "../../../../types" ; param task param frame param setting export async function PPTScript ( task , frame , setting ) { const imglook = await frame . $ ( "#img.imglook" ) ; if ( imglook ) { task . process ( "正在播放PPT" ) ; await frame . evaluate ( ( imglook ) => { const finishJob = ( window as any ) . finishJob ; if ( finishJob ) finishJob ( ) ; } , imglook ) ; await new Promise ( ( r ) => setTimeout ( r , 5000 ) ) ; task . process ( "PPT播放完毕" ) ; } }