Jump to content

Paint.NET Automation (not a request!)


SearedIce

Recommended Posts

Some of you may be familiar with "AutoHotKey" or "AutoIt". These programs give a Windows computer Apple-script-like capabilities. You can automate simple tasks that are boring/time-consuming, bind new hotkeys for things, run software, manage the clipboard, etc. etc. etc.

I thought it'd be cool to use the icons on my desktop in my desktop's background in some way ... to mimic next-gen OS GUI effects, if at least on the desktop...

I took a screenshot of my current desktop to show what I mean (right now, glowing icons):

http://www.seas.upenn.edu/~drake/bgu/BGU01.jpg

Anyway... so I wrote a script for AutoIt that does the following:

Minimizes all windows

Changes the desktop background to "None"

Screenshots the desktop icons

Opens PDN

Pastes the screenshot to a new image

Applies a Gaussian Blur

Saves the image

Applies the image as my computer background

The steps could be changed, and any effects (or combinations of effects could be used). You could even have it add an image to the mix (a normal background).

Here's the script file:

http://www.seas.upenn.edu/~drake/bgu/BackgroundUpdate.au3

With a script, if the icons on my desktop change (move files around or install a new program), I just run the script and it takes less than 30 seconds to produce a new background.

Now, this may not seem desireable to most, but I happen to like how it works out and I think the concepts could be applied to other PDN automation tasks. Also, it sure did impress my girlfriend!

AutoIt (open source = free!):

http://www.autoitscript.com/autoit3/

-John

Link to comment
Share on other sites

This is fascinating! We could actually program macros for PdN?

Sweet!

I see how it works, too.

;Run a Gaussian Blur effect (20 pixel size)
;This works by navigating the Effects menu with simple down/right key presses...
;It depends on how many effects you have installed...you will have to change the 3rd line below
Send("!c")
Sleep(100)
Send("{DOWN}{RIGHT}{DOWN 3}{ENTER}")
Sleep(100)
Send("20{ENTER}")
Sleep(100)
WinWait("Gaussian")
Sleep(100)
WinWaitClose("Gaussian")
Sleep(100)

Good job!

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former"

[ dA Paint.NET Chat :: Yata on dA ]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...