Ask Your Question
1

How can macro check regularly if the date has changed

asked 2018-07-06 05:10:23 +0100

shma_lo gravatar image

My calc application is always open. How can it check if the date has changed (without clicking any button or other object)? Is it possible to have some macro which checks the date hourly?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-07-06 07:27:04 +0100

JohnSUN gravatar image

Of course, this can be done. To implement the timer functions, you can use, for example, a Beanshell script, and add all the necessary actions to implement in BASIC, Python or any other programming language. Look at this example and modify it at will. C:\fakepath\Demo Timer.ods

edit flag offensive delete link more

Comments

I think I don't understand something. I started your script by clicking button "Start" and got the message "BASIC runtime error. An exception occurred Type: com.sun.star.script.provider.ScriptFrameworkErrorException Message: ProviderCache::createProvider() Error creating provider from factory!!! Could not create Java implementation loader." in the line oScript = oSP.getScript("vnd.sun.star.script:timer.timer.bsh?language=BeanShell&location=document") What is wrong?

shma_lo gravatar imageshma_lo ( 2018-07-09 13:22:01 +0100 )edit

It is possible that a) Java is not installed on your computer, or b) the use of Java is not allowed in Tools-Options-Advanced, or c) the bits of the Java machine and the office suite do not match (one of them is 32 bits and the other is 64 bits)

JohnSUN gravatar imageJohnSUN ( 2018-07-09 15:40:16 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-07-06 05:10:23 +0100

Seen: 32 times

Last updated: Jul 06 '18