Macro Scheduler 13.1.05 Available
Macro Scheduler 13.1.05 maintenance release is now available.
Macro Recording and Automating Windows with Macro Scheduler – Tips & News
Macro Scheduler 13.1.05 maintenance release is now available.
Over on the forums JRL asks how to get into the “Programming Zone” and once there how do you stay in it and cope with distractions and interruptions? Any tips? Add your thoughts and suggestions to the topic.
Can you send keystrokes to invisible or unfocused windows? The answer is yes, if the control you want to send the keystrokes into is a “windowed control”. That is, one that has a handle.
If that’s too technical just try using the “Send Keys to Object Wizard” in Macro Scheduler 13 which generates code that uses the ObjectSendKeys function. Or Watch the video to see it in action.
If the wizard is able to identify the control the code that it generates will work even if the window is not visible or not focused. This is because it works by sending the keyboard codes directly to the specified control.
In contrast the regular Send command sends characters into the global input buffer. In other words it sends keystrokes into whatever happens to have the focus at the time. The great thing about this is that it means it can send keystrokes to ANY thing regardless of whether it is a windowed control or not and regardless of the technology. But the control does need to be focused.
So if your control has a handle then you can use ObjectSendKeys to send keystrokes to it and avoid it having to be focused. This also means it will work even if the window is minimized, or hidden. This could be turned to your advantage if you wanted to manipulate a window and be able to do something else at the same time. Of course this assumes that all the controls have a handle which is not always the case.
As an example, run this script. Notepad will open, then be minimized and then text will be sent into it. When the script has finished restore Notepad and you should see the text inside it.
Run>Notepad.exe WaitWindowOpen>Untitled - Notepad WindowAction>2,Untitled - Notepad GetWindowHandle>Untitled - Notepad,hWndParent FindObject>hWndParent,Edit,,1,hWnd,X1,Y1,X2,Y2,result ObjectSendKeys>hWnd,{"Hello World"}
Many thanks to everyone who submitted and/or voted on an entry to our Kindle Fire contest.
We had so many great entries that it was so hard to choose and the decision was hotly debated between all the judges lobbying for their favourites. But we ended up going with Lorence Sing’s “Because everything matters” story which everyone loved.
For the past 13 years, the Laboratory at Nationwide Children’s Hospital in Columbus, Ohio, has benefited enormously from a small piece of software found on the internet, software that has saved staff time, assured patient and management reports have run at the right time, on time, every time.
In 1997, the laboratory changed to a new Laboratory Information Ssystem, a new more modern LIS. For 10 years prior, we ran a system that required 24×7 computer operators to run jobs, print specimen labels, patient reports, microbiology and virology reports, blood bank reports. Our new system would eliminate the need for most of that, with many of the reports able to be scheduled and run unattended. Several reports, though, specifically reports microbiology reports concerning infectious disease, nosocomial reports, and basic epidemiological reports all had to be run manually, as did all of the blood bank reports.
These reports are incredibly important to the health and welfare of Children’s Hospital’s patients and doctors and need to be run on time, every time.
To enable proper execution of theses critical reports, I searched online for a product that would let me schedule tasks. I was NOT impressed with the Windows Task scheduler. I found Macro Scheduler at www.mjtnet.com. I’m not sure where, possibly through download.com, but I knew when I read about its many features that I had to try it. The free download showed me immediately that this was the product I’d been looking for. Since that first very inexpensive purchase we have painlessly upgraded several time, migrated to new hardware without incident, helped to save lab tech frustration, countless hours of system analyst time, and most importantly, innumerable lives. Every day, the epidemiology report that Macro scheduler initiates may potentially save a child’s life.
In the many years that we have used MJT Net’s Macro Scheduler, we’ve expanded its use, executing reports, renaming files, backing up data, zipping log files, restarting system interfaces, manipulating printers via their internal web server, even created a stand alone password reset application for the hospital’s help desk to utilize. My next major project with Macro Scheduler will involve its graphics recognition capabilities to automate a tedious weekly interface wiretap reset.
At the end of nearly every user satisfaction survey I’ve ever taken, there is one common question – “Would you recommend this product to a friend?” Marcus hasn’t asked me this question, but I can say without hesitation “Yes!” Not only would I recommend Macro Scheduler to a friend, but I have, many times. I frequently give presentations to the Sunquest Users Group (SUGInc.org) and Macro Scheduler is the basis for one of my presentations, “The Unschedulables” (http://lorencesing.com/SUG-XI,The_Unschedulables.zip).
In conclusion, Macro Scheduler from http://www.mjtnet.com/ hasn’t just been a useful tool, it has been a lifesaver. Our Hospital’s slogan is “When your child needs a Hospital, everything matters.” Macro Scheduler is one of the small details that help us make that true.
Lorence sing, MT(ASCP)
LIS System Analyst
ChildLab Database Analyst
Nationwide Children’s Hospital, Columbus, Ohio
http://www.nationwidechildrens.org/
Congratulations Lorence, your Kindle Fire is on its way.
Thanks to everyone for the great entries.
Every now and then someone asks whether Macro Scheduler works on 64 bit Windows and if there are any implications. Another question that comes up very occasionally is “Why no 64 bit build of Macro Scheduler?”
Well, first of all, yes, Macro Scheduler runs on 64 bit versions of Windows and it can control and automate 64 bit applications. There are very few implications to be aware of and the vast majority of people will never need to worry about them.
1. File System Redirection for Processes living in the System Folder
As Macro Scheduler is a 32 bit application if you try to execute a process that resides in the System32 folder by specifying System32 in the path Windows will force Macro Scheduler to look in the 32 bit subsystem folder instead. This is Windows\SysWow64.
Sound confusing? Blame Microsoft. The System32 folder has remained System32 even on 64 bit versions, and the 32 bit versions of system processes/DLLs are in Windows\SysWow64. Since a 32 bit process cannot load a 64 bit DLL Microsoft uses something they call “File System Redirection” to redirect 32 bit apps to look in Windows\SysWow64 to prevent errors when loading system DLLs.
The only time this might affect you is if you specifically want to execute a .exe or load a file which lives in System32 and there is no 32 bit equivalent and/or you really do want to run the 64 bit version. This is rare for the large majority of users. But some of you system administrators may very occasionally want to do this.
The solution is simple. With Macro Scheduler 13 simply refer to the file using the SYS_NATIVE variable which returns an alias to the *native* system folder which will not get redirected (rather than the SYS_DIR variable which will return the system32 folder name which will be redirected to SysWow64). Specifying the literal C:\Windows\System32 path will also be redirected and is not sensible anyway, as these folder names aren’t necessarily fixed (and may not be on drive C) – use the variables. SYS_NATIVE is simplest and is also portable since it will work on 32 bit windows.
Another way to do it is to disable file system redirection which can be done with the Wow64DisableRedirection command. But, very important, remember to renable it with Wow64EnableRedirection. A safer way is to set the RP_WIN64PROCESS variable to 1 before your RunProgram call. This will disable redirection for only all subsequent RunProgram calls rather than the entire process.
Personally I’d go with SYS_NATIVE.
Remember, we’re only talking about the need to run files which live in System32. You need not do anything special for other 64 bit processes. It is simply that Windows will divert you away from System32.
File System Redirection is explained in more detail here.
2. The 64 Bit Registry Hive
In a similar way, calls by 32 bit processes to some parts of the registry may be redirected. This is explained here. If you specifically want to access the 64 bit version of a registry key you need to set REG_64 to 1 before a call to one of the Registry functions.
That really is it. Both situations are rare for the vast majority of users who are automating end-user applications. Only a small minority using the software for really low level system administration tasks may need to be aware of these things.
This is another way of asking “Why isn’t there a 64 bit version of Macro Scheduler?”. Well, while a 64 bit version would solve these two rare cases, it would also, by extension, turn the two cases the other way around and create another problem. While it would automatically see the 64 bit System folder, you’d have to set a flag or use another variable to make it go to the 32 bit subsystem if you needed to. Same again for the registry.
So you see there is no gain. No difference. It just turns things around. There are more inconveniences with a 64 bit version.
The vast majority of applications out there are still 32 bit. The vast majority of things our customers are automating are 32 bit. Macro Scheduler can control and interact with both 32 and 64 bit applications interchangeably. It is very rare that anyone would ONLY be interacting with 64 bit processes. More often than not if you are needing to control a 64 bit app it is probably when you also need to control a 32 bit one. So support for both, at the same time, is more important.
Our text capture libraries rely on system level hooks which hook various text out calls. Therefore they need to have separate hooks for 64 bit apps and 32 bit apps. Previous versions of Macro Scheduler only had a 32 bit hook. This meant we could only get text from 32 bit processes. With the new version we included a 32 bit hook and a 64 bit hook with a 64 bit proxy allowing the 32 bit hook to get text from 64 bit applications.
Now, if we made a 64 bit version of Macro Scheduler you could get text from 64 bit processes, but if you also wanted text from 32 bit processes you’d need things the other way around (again, no gain or difference). Or we could have offered two versions of Macro Scheduler which could ONLY get text from apps of the same bitness. Since most people need to control both or need to control 32 bit apps running on 64 bit windows and may need to get text from the system as well as the 32 bit app, that wouldn’t help them.
So rather than offer two versions which would be limited or would still need to do special things in certain circumstances, right now it seems safer and simpler to continue to offer the 32 bit version, with the 64 bit text capture proxy, which can automate and control both types of processes. It is much better for us to provide and support one build which works in all situations.
And whichever way we go there is no getting round the redirection issues one way or another. This is not unique to Macro Scheduler: whatever programming language you use you need to explicitly tell it if you want to avoid the redirection issues (whichever the direction).
So hopefully you can see that there’s no real benefit in offering two different versions.
We’re always monitoring the way things are going. One day the situation might be reversed and the majority of applications may become 64 bit.
We can already create 64 bit builds. If we perceive a NEED we’ll publish it.
In the mean time if you think you NEED a 64 bit only version, drop me a line and explain why and we can get you a custom build, if you do really, really need it.
Update 10th May 2012: The final, branded, PDF version of this case study can be seen here.
Really pleased to share with you the following Macro Scheduler case study which was signed off last week. We’re currently polishing it up for publication on the website but in the mean time here it is:
“We’re part of an NHS Trust and have a responsibility to be conscientious with our resources,” says Jonathan Goss, Senior IT Project Manager at the Royal Bournemouth Hospital. “A never-ending cycle of working with multiple vendors, purchasing additional modules, and burning through consulting hours to arrive at a solution is not an option.”
The Royal Bournemouth Hospital – one of two hospitals serving over half a million residents in Bournemouth and Christchurch – is a Foundation Trust in the UK’s National Health Service (NHS) . As part of an initiative that has been underway since 2007 to streamline administrative processes, the Trust has adopted an Enterprise Content Management (ECM) System to help facilitate their goals of reducing paper printing and storage, and improving management efficiency, among other things.
The ECM system is being implemented within multiple departments, from Human Resources and Finance to clinical departments and beyond, and is required to interface with a variety of systems already in place. To further complicate matters, it needed to route data to the Electronic Staff Record (ESR), a centralised system in use by all NHS organisations . Although the ECM system recently adopted by the Trust is flexible and has integrated well with many of the hospital’s legacy applications, interface gaps started presenting themselves.
“We turned to our suppliers first and found that it was going to be too expensive and time-consuming just to get proof that they could create an interface for us,” says Jon. He has been a part of the IT department at Royal Bournemouth for 4 years and knew they had to find a different way.
Faced with what Jon and his team thought were only two options: continue using manual processes to bridge the gaps, which is precisely what they are working toward minimising; or work with multiple vendors in what was sure to be a lengthy and expensive process they had already determined wasn’t appropriate, a third option emerged when someone recommended they look to automation for a solution.
Software Automation, quickly gaining popularity by solving integration problems in many industries including healthcare, is a technique that works by manipulating the user interface and simulating user input, to efficiently and cost-effectively automate various tasks that were once performed manually. This avoids expensive and time consuming software customization and solves problems where traditional interfaces don’t exist. After determining a well-known automation vendor in the healthcare industry was out of their budget, Jon turned to Google to see what else was out there.
“I found Macro Scheduler and, after reading the customer reviews on the website, became interested in hearing more. After a couple of screen sharing meetings and conference calls, I was comfortable that we had found our solution and MJT would deliver,” says Jon.
The first gap to be bridged was in the GU Medicine Department. Paper files were being digitised and stored in the new ECM system successfully, but they also needed a way to get patient data from those digital files into the department’s existing clinical management system.
“Each patient who attends the clinic is given a diagnosis code that then needs to be entered into the department’s clinical management system,” Jon explains. “The old way was for someone to look at each paper file and manually enter the code into the system. Now that the files would be digitised and stored in the ECM system, we needed a way to make the ECM system talk to our clinical management system and share that data.”
They had approached the clinical management systems’ vendor for help with the interface and determined it would be too expensive for them to do. That’s when they called in MJT Net’s President, Marcus Tettmar, to help them build a proof of concept that would automate the process with Macro Scheduler that could potentially build the first bridge.
Using Macro Scheduler, Tettmar was able to automate the manual file and system updates, that could ultimately result in about a 20-hour weekly time savings, a massive amount for a busy reception team. This would allow for more time spent with patients and responding to clinical inquiries.
Impressed with the power of Macro Scheduler and the speed with which it can be deployed, Jon and his team worked with MJT Net to run a series of test cases in other departments while the automation proof of concept was underway in the GU department.
Their first proof of concept was in the Human Resources Department, where previous evaluations of interfacing applications had resulted in bids outside their budget.
“We needed to send employee appraisal data to the NHS central system, ESR (Electronic Staff Record), and had been told that making those systems interface was going to be costly and time-consuming.” Sending data manually for 4,500 staff members could equate to about 5 work weeks annually.
“In about half a day with Macro Scheduler, we had the system taking employee appraisal dates from our in-house system and feeding them directly into the ESR to prove we could do it,” Jon explains.
Next, they moved to accounting, where today there is a live Macro Scheduler script being used to automate the production of invoicing to a particular sub set of suppliers.
“Accounts Receivable sends out about 200 supplier invoices each month to a particular sub set of suppliers, which has historically been a 2-3 day process of creating individual invoices by manually typing information into our financial system,” Jon explains. “We wrote a script in just over one day with Macro Scheduler that reads an Access database, pulls invoice data and creates a batch within our financial system.”
Doing so has freed up the staff member from the monotony of data entry 2-3 days each month, or 20+ days annually, to focus on more high value tasks.
As they move forward, Jon and his team have plans to expand their use of Macro Scheduler across other parts of the hospital.
“We’re already using Macro Scheduler to populate day-to-day systems, and we will likely use it to build a bridge between our in-house systems and the ESR” he says.
There’s more on using Macro Scheduler in Healthcare settings right here.
Need to measure how long a process or a set of commands in your script takes?
We used to have to do this with VBScript’s Timer function. As of v13 Macro Scheduler has it’s own Timer function.
Timer>result
Returns the number of milliseconds that have elapsed since the script was started.
So let’s say we want to measure how long a script takes to run. We could use Timer at the top of the script to get the current milliseconds value, then again at the end and take one from the other to get the elapsed duration in milliseconds:
Timer>startTime .. .. some code here .. Timer>endTime Let>elapsed_seconds={(%endTime%-%startTime%)/1000} MessageModal>Seconds Elapsed: %elapsed_seconds%
We have today released WebRecorder 3.0.
This is a major rewrite with a better recording engine capable of recording more tags and producing leaner, cleaner, code and a faster and more reliable runtime.
It also introduces a download manager so that file downloads can be recorded and scripted more easily without recourse to sending keystrokes to IE’s standard file download box.
We’ve improved the existing commands so that you can script more tags and use more attributes and added new functions for retrieving data, retrieving the screen position of elements and interfacing with the new native IE functions in Macro Scheduler 13.1.
Oh, and you no longer need to use the mouse to record clicks and form fills!
More information on WebRecorder here. WebRecorder 3.0 scripts require Macro Scheduler 13.1 to run.
Enterprise customers with in-date maintenance can already download WebRecorder 3.0 from the registered download area.
Other customers can view upgrade options in their registered download account, or download a trial version here.
Macro Scheduler maintenance release 13.1 is now available for download.
Registered Downloads/Upgrades | Evaluation Downloads | New License Sales
Voting for our Kindle Fire contest is now open.
We’ve had a bunch of great entries. Some great uses of Macro Scheduler revealed such as automating game play, monitoring a global network of routers and DHCP servers, automating the production of medical reports at a Childrens’ Hospital, monitoring and reacting to stock movements, audio file retrieval, and all kinds of automated data entry.
Please check out the entries and vote for your favourite and share it with your friends. If you have entered yourself share it on your wall and ask your friends to vote.
Voting is open until 29th Feb and the winner will be announced first week of March.