Jump to content
Sign in to follow this  
MortaR

Right Click Context

Recommended Posts

MortaR

I am trying to create an a script where you can right click on any number of files in Windows Explorer, click on "Print" and it will open the first file, print it and then close it and if there was more than one selected, go onto the next. etc.

This seems highly possible with AutoIT, and the latter is easy, although i'm just not sure how I can pass the filename(s) into a variable in AutoIT (i.e. %1) to make them usable.

Any help would be much appreciated!

Cheers

Share this post


Link to post
Share on other sites
dbzfanatic

Not exactly what you want to do but it might be more fun :) try creating a drag&drop GUI so you can just drag the files, click a button and print the files in order. You can get the filename that way and it should be easy enough to cycle through all the files, although I'm not 100% sure HOW at the moment because I'm 99% asleep :)

Share this post


Link to post
Share on other sites
MortaR

Not exactly what you want to do but it might be more fun :) try creating a drag&drop GUI so you can just drag the files, click a button and print the files in order. You can get the filename that way and it should be easy enough to cycle through all the files, although I'm not 100% sure HOW at the moment because I'm 99% asleep :)

Basically I want to provide the same functionality to CAD files in TurboCad, that Microsoft has with word files.. You can highlight several word documents at any one time, right click on them and click Print, it will open them individually, print, then close them.. The only advantage to this method is that the program doesn't have to be running all the time.. If noone else has any ideas, i'll have to try your idea! thanks for the advice.

Share this post


Link to post
Share on other sites
Siao

To add new explorer context menu options for some file type, go My Computer > Tools > Folder Options > File Types, pick extension from the list and click Advanced... You can check out some existing Print options (lets say for DOC or TXT files) to see how it's done.

That's if you're doing it for yourself. If you're making an app for other users, you'd have write code to modify registry directly.

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites
maqleod

$CmdLineRaw was what I was looking for.

you probably just want to use $CmdLine and i think with the %1(file path) it will be $CmdLine[2] with most files

[u]You can download my projects at:[/u] Pulsar Software

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×