background preloader

Automation

Facebook Twitter

Word

Rundll. AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText. Watsup-users. HOWTO - Print to a windows printer from linux WITHOUT needing any linux printer drivers/PPDs. By Justin Yackoski - (my email address is my first name @ my last name dot name) Translations Portuguese by Luís Bastião SilRussian by BuhCIA (buhcia 2006 at yandex dot ru) Note these translations are slightly out of date but still very much work.

HOWTO - Print to a windows printer from linux WITHOUT needing any linux printer drivers/PPDs.

If you've translated this HOWTO into another language, please let me know so I can add it. I would be happy to host the translation here if you send me the HTML! If you have questions and are using a translated version, you'll either have to ask the author of the translation or another speaker of that language, or ask me the question in English.

What is this HOWTO for? People who have at least 1 windows PC (or a windows VM), and 1 or more linux PCs connected via a network. Why would you want to do this? Without this method, your printer must be supported under linux to be able to print to it from linux, even if it is attached to a windows PC and you want to print to it via SMB. Is there any other option? Windows PC Requirements/Assumptions Thanks. How to get the status of a printer and a print job. The status of printers and print jobs are updated by the Win32 Spooler during the despool of a print job.

How to get the status of a printer and a print job

At all other times, when that printer is not despooling and reports no state information, the printer is considered to be ready and idle. As referred to by the Win32 API, a "printer" is comprised of the printer driver, the print queue, and the input/output path to the physical printer. The operating system treats a physical printer as merely the destination of a print job generated by and passed through a system "Printer," referred to in the rest of this article as a Printer. The most visible part of a Printer is a print queue. It is managed by the Print Manager or the Printer folders in the Windows 95-style user interfaces. Enumerate printer job information. Python Win32 Automation. Tizmoi.net. Launchy: The Open Source Keystroke Launcher for Windows. Work Faster in Windows With Launchy and a few Python Scripts. Launchy is a great productivity tool and a cool way to impress your friends.

Work Faster in Windows With Launchy and a few Python Scripts

You can launch any application by pressing a hotkey (say Alt+Space) and the first few letters of the application for eg: typing ‘gi’ will display the GIMP icon and pressing Enter will launch GIMP. You can download Launchy from its website and its beta is pretty stable (and gorgeous) on my XP laptop too. Using Launchy gets pretty addictive and soon you will hate using the Start menu or even Explorer on Windows for opening applications or files.

So I took the red pill and started automating the following things with a little help from Python: Launching Intranet applications inside Internet Explorer (even if Firefox is your default browser)Bringing minimized or overlapped windows to the foreground Some Necessary Evil Don’t get me wrong, I hate IE as much as you do. Tim Golden's Python Stuff: wmi. Python Win32 Automation. Kevin Vance - Windows automation with Python. I had to automate a GUI task in Windows the other day.

Kevin Vance - Windows automation with Python

Since all of the Windows "macro tools" required programming anyway, I decided that I might as well use a language I know already. I opened up my python shell, and 20 google queries later I knew everything I needed to. For anyone else stuck doing this, here are some helpful recipes: Setting the window focus import win32com.client shell = win32com.client.Dispatch("WScript.Shell") shell.AppActivate('Some Application Title') We use a Windows Script Host COM interface to access the AppActivate() function.

Sending keyboard commands shell.SendKeys('%fo') # Alt+F, O time.sleep(0.1) shell.SendKeys(path) shell.SendKeys('{ENTER}') This code will open the file located at path using the standard open dialog keyboard commands: File, Open, pathname, ENTER. The whole program needs to be sprinkled with time.sleep() functions to allow for new windows to load and other operations to complete. Positioning the mouse cursor relative to a window. WinGuiAuto.py. Printing Word And PDF files from Python. Printing Word And PDF files from Python Recently I had to automate printing a whole bunch of CVs on Windows.

Printing Word And PDF files from Python

Having successfully avoided VBA my whole programming life, it was time to think fast. Thankfully Python has some win32com bindings, which allows you to talk COM to various Windows applications, and get them to print the documents. First you need the Python win32com bindings. Printing Word documents Microsoft Word has a nice COM interface, which is well documented. From win32com import client import time word = client.Dispatch("Word.Application") def printWordDocument(filename): word.Documents.Open(filename) word.ActiveDocument.PrintOut() time.sleep(2) word.ActiveDocument.Close() word.Quit() This opens the Word application without making it visible to the user, opens the document, prints it out on the users default printer, and closes the document, then the application. Printing PDF documents. Pythonic Windows Printing.