מקרו באימפרס
אני מנסה לכתוב מקרו שידלג לדף אקראי בלחיצת עכבר מצאתי את המקרו הבא, אבל בפועל המצגת נשארת בעמוד הראשון למרות שה current page משתנה תודה מראש חגי Sub Main odoc = thisComponent page = odoc.getDrawPages().getByIndex(0) 'first page shape = page.getByIndex(0) 'first drawing-object shape.onClick = com.sun.star.presentation.ClickAction.MACRO shape.Bookmark = "MouseClick.Module1.Standard" theIndex = ThisComponent.CurrentController.CurrentPage.Number End Sub Function MouseClick() adoc = thisComponent theIndex = ThisComponent.CurrentController.CurrentPage.Number msgbox theIndex if theIndex < 3 then oDocCtrl = adoc.getCurrentController() oDocCtrl.CurrentPage = adoc.getDrawPages().getByIndex(3) end if End Function
אני מנסה לכתוב מקרו שידלג לדף אקראי בלחיצת עכבר מצאתי את המקרו הבא, אבל בפועל המצגת נשארת בעמוד הראשון למרות שה current page משתנה תודה מראש חגי Sub Main odoc = thisComponent page = odoc.getDrawPages().getByIndex(0) 'first page shape = page.getByIndex(0) 'first drawing-object shape.onClick = com.sun.star.presentation.ClickAction.MACRO shape.Bookmark = "MouseClick.Module1.Standard" theIndex = ThisComponent.CurrentController.CurrentPage.Number End Sub Function MouseClick() adoc = thisComponent theIndex = ThisComponent.CurrentController.CurrentPage.Number msgbox theIndex if theIndex < 3 then oDocCtrl = adoc.getCurrentController() oDocCtrl.CurrentPage = adoc.getDrawPages().getByIndex(3) end if End Function