Newbie trying to learn batch files...

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
To be honest the {PRTSC} command with sendkeys never worked for me.

Hopefully you'll have more luck but as an example, typing

sendkeys "{PRTSC}", true

into the immediate window in the VBE and pressing enter doesn't copy anything to the clipboard which is what I'd expect if it was emulating pressing the Print screen button.

Nick
 
To be honest the {PRTSC} command with sendkeys never worked for me.

Hopefully you'll have more luck but as an example, typing

sendkeys "{PRTSC}", true

into the immediate window in the VBE and pressing enter doesn't copy anything to the clipboard which is what I'd expect if it was emulating pressing the Print screen button.

~Nick

I just popped into the VBE and tried it in one line subroutine and no luck either. Don't have time to test in SCRIPTing. But not looking very promising, is it?
 
No, didn't work in vbscript either when I tried. You should be able to do it with an API call, I saw a site for it that was showing you how to do that in VB so I assume that's transferrable to VBA.

Unfortunately you cant use API calls in VB script otherwise that solution would have worked and I can't remember the page where I found it to check it in VBA. I'm assuming that it's not an office product this is being called from anyway otherwise batch files wouldn't be necessary.

Annoying not having a solution to this one.
 
I thought what I am trying to do is relatively easy, but I can't find a thing anywhere on the internet to help me out here. I'm looking for an answer and possibly a forum that rocks the house like this one for my silly batch file.

Several times a day at work, my reps have to do a screen print. So they hit their printscreen button, open WordPad, paste it, and print. Should be easy enough to automate this. Now I know that there are a billion freeware titles out there, but as usual, nothing can be installed on these computers. I have been able to get far enough in a batch file to get WordPad open. I don't know how to paste the contents of the clipboard into the new open document. It would really be nice if the print window opened immediately after the paste. So those of you that are familiar with this, please stop laughing at me and point me in the right direction. I have nothing to offer buy some stale Skittles that are under my couch cushions and my undying affection.

Billy, what applications do your workers have avail. to them ??
MS OFFICE ??
What is the Application that they open
What scripting code do you currently have ?
 
Hi Billy, cute kid!

Anything wrong with running a VBS file? You could even set it up to run like a batch file with windows scheduler. This might help..

http://tinyurl.com/3djwn2

Note to run VBS files you must have Windows Scripting Host installed (generally installed with all Windows, 2000 and up, not sure about 98 or NT, also works with Windows Server 2003).
 
But how do you do the screen print with a vbs file?
~Nick

Thanks, Nick. I thought I was the only dummy in the group. That URL Zack X-refs uses Excel.; which Billy says ain't in the toolbox. But I think we're probably at an impasse until Billy shows up and answers Ivan's questions.

BTW, Ivan, thanks for stoppin' by. I think that if these machines had any Office Apps, Billy would be looking to use VBA. Since he's using something as rudimentary as WordPad, I'm guessing there are no Office apps on them. No clue what's that app that's actually the active window during the PrintScreening, though.
 
Hmm, I guess that begs the question: Is Office installed on these machines? What is their OS? Do they have admin privileges?
 

Forum statistics

Threads
1,222,710
Messages
6,167,778
Members
452,141
Latest member
beraned1218

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top