"send to printer" macro |
Post Reply |
Author | |
alassiel
Member Joined: 26/Sep/2011 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 30/Apr/2012 at 9:46am |
Greetings,
I tried using the Macro Builder in the toolkit to create a macro that sends Ctrl+P to the foreground application. The toolkit seems to build the macro just fine; I get all of the expected popup windows indicating that the macro has been built. However, when I actually try to use the macro, I get unexpected results. For example, when I speak the macro name in Word or Excel, they each open the Font dialogue window. When I try it in my calendar software (Franklin Covey PlanPlus), the application crashes. Obviously, if I use the keyboard to press Ctrl+P, all three applications open up the Print dialog box. Anyone have any ideas what I need to do to get this to work? I've built other key press macros and they're working as expected. Thanks in advance for any feedback. Here's how I completed the macro builder window after which I clicked the build button: |
|
mmarkoe_admin
Admin Group Joined: 16/Jul/2008 Status: Offline Points: 331 |
Post Options
Thanks(0)
|
It sounds as if the problem is Global Command. It seems as if a Global Command should work, but apparently does not. Simply specify each program in the field labeled: For example, Browse to the Word executable. On the computer workstation I am currently using it is at: C:\Program Files\Microsoft Office\Office12\WINWORD.EXE Then name the command something like, "Print to Word" After adding Ctrl + P to the Action List, add a Pause with the Command Key "Enter" in order to execute the OK in the Print Dialog Box. Edited by mmarkoe_admin - 30/Apr/2012 at 11:18am |
|
alassiel
Member Joined: 26/Sep/2011 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Thanks for your quick response. I followed your suggestion and created two macros, "Print document" and " Print spreadsheet", each pointing to their specific application, namely Word and Excel. For now I kept the macros simple, just a Ctrl+P sequence. Unfortunately, the results were the same as when I created a single global command : (. Both macros still continued to open the Font dialogue box. I opened the WSR macro editor so that I could see the xml for the macro created using the Macro Builder in WSR toolkit. I pasted the relevant lines for the "Print spreadsheet" macro below. Also included the screen shot from the Toolkit Macro Builder. Any other ideas? Am I doing something wrong? Thanks.
<!-- Command macro created with WSRToolkit (Version: 2.0.4.0) 4/30/2012 1:38:26 PM --> <speechMacros> <command> <appIsInForeground processName ="Excel.exe"/> <listenFor>Print spreadsheet</listenFor> <sendKeys>{{CTRL}}P</sendKeys> </command> |
|
mmarkoe_admin
Admin Group Joined: 16/Jul/2008 Status: Offline Points: 331 |
Post Options
Thanks(0)
|
The 2 macros Print to Word and Print to Excel are below. These work perfectly in Office 2007. They should work fine in Office 2010 as well. Try these. They were created with the Macro Builder in WSRToolkit version 2. Marty Markoe, eMicrophones, Inc. <!-- Command macro created with WSRToolkit (Version: 2.0.4.0) 4/30/2012 2:47:01 PM --> <speechMacros> <command> <appIsInForeground processName ="Winword.exe"/> <listenFor>Print to Word</listenFor> <sendKeys>{{CTRL}}p</sendKeys> <sendKeys>{ENTER}</sendKeys> </command> <Signature> <!-- Command macro created with WSRToolkit (Version: 2.0.4.0) 4/30/2012 2:48:39 PM --> <speechMacros> <command> <appIsInForeground processName ="Excel.exe"/> <listenFor>Print to Excel</listenFor> <sendKeys>{{CTRL}}p</sendKeys> <sendKeys>{ENTER}</sendKeys> </command> <Signature>
Edited by mmarkoe_admin - 30/Apr/2012 at 4:47pm |
|
alassiel
Member Joined: 26/Sep/2011 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
This is the message I got when I clicked on the links. Help, please :).
Server Error404 - File or directory not found.The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. |
|
alassiel
Member Joined: 26/Sep/2011 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Hi Marty,
Thanks for showing me the xml for the macros that you created. I carefully compared one to the macros that I had created and found the important difference. The key sequence to send something to the printer is Ctrl plus a lowercase "p", not an upper case "P". When building the macro in Toolkit, I reflexively entered an upper case "P" because you always see it written as Ctrl+P and I neglected to consider that behind the scenes this translated to Ctrl+Shift+P. Well, I discovered that in Word and Excel, the key sequence Ctrl+Shift+P opens the Font dialog box. I recreated my macro, "Send to printer", as a global command using a lowercase "p"; it works perfectly from all three applications (Word, Excel, calendar). Thanks for your help :). |
|
mmarkoe_admin
Admin Group Joined: 16/Jul/2008 Status: Offline Points: 331 |
Post Options
Thanks(0)
|
Good to know. Thank you. Marty
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |