Jump to content
Macro Express Forums
zoobiewa

Fast Public Screen Grabs

Recommended Posts

Overview

 

I've often thought that chat programs need a simply way to send images of the screen to one another. There may be something that I don't know about, but I found my solution in macro express.

 

One of the most frustrating things is trying to get someone else able to see EXACTLY what you are looking at. Say you want to show someone an article, but they needed to register and go through steps to see it. Or what if what you wanted to show required them to download software, install plugins, etc. I find this problem annoying when trying to communicate to less computer savvy people. But the thing most everyone CAN do is click on links.

 

What my simple script does is save a screen grab to a file, upload the file to an ftp server, and copy the url of the image to the clipboard. Then you can simply paste away, and the person on the other end of the communication line will be able to see exactly what it is you are talking about. The script may be extremely simple, mundane, and obvious for many of you, but I think it's a good example of how macro-express can be used fill software gaps.

 

What you need:

 

Screen-grabbing software - Everyone knows about print screen, but it seems overkill if you only want to show something specific. I use the built in screen grabber in Microsoft onenote, which allows me to grab a crop of whatever size and dimensions I wish.

 

An ftp server - Hopefully self-explanatory.

 

Macro Express - Self-exp as well.

 

Now, create a new macro, and paste the following into editor (doesn't matter which, scripting or direct):

 

<TVAR2:01:02:FPlease name the image:FFCenter:Center>
<TBOX4:T:3:CenterCenter000278000160:000:StatusConnecting...>
<CLIPSG2:0:!!Location on your hard drive!!\%T1%.jpg>
<TVAR2:02:01:!!full path of online directory!!/%T1%.jpg>
<TMVAR2:16:02:00:000:000:>
<FTPCONNECT:97:FF:yourftp.ftp:00021:username:‰HŒŒˆ‹K>
<TBCLOSE:Status>
<TBOX4:T:3:CenterCenter000278000160:000:Status%T97%
Changing Directory...>
<FTPCHDIR:98:/online/directory/here/>
<TBCLOSE:Status>
<TBOX4:T:3:CenterCenter000278000160:000:Status%T97%
%T98% Uploading image...>
<FTPSEND:99:B:!!full online path again!!\%T1%.jpg><TBCLOSE:Status>
<TBOX4:T:3:CenterCenter000278000160:000:Status%T97%
%T98% Success! %T1%.jpg uploaded.>
<FTPDISCONNECT>
<TBCLOSE:Status>
<TBOX4:T:2:CenterCenter000278000160:001:Status%T97%
%T98% Success! %T1%.jpg uploaded. Clipboard set to: %T2% Paste away!>

You'll see a bunch of annoying boxes that say, [text type]. I added them just so the code could be viewed in the box, so just delete those. Once you do that, it should look like below. The highlighted boxes are what you'll need to put your own information into (local folder, ftp server, username, password).

 

clipboard_script.jpg

 

Quirks.

 

The status box thing flickers because there doesn't seem to be a way to have it remain constant in macro express. If there's any way to make this look nicer, please let me know. And of course, if there are ways to make this script more streamlined or clean, I'd appreciate feedback.

Share this post


Link to post
Share on other sites

((Yay, my first post ^_^))

 

I've kept this as a personal project for a long time. I really got kind of tired of how hard it was to show people things on my screen. My script, however, uses two other programs in addition to ME. The first, Irfanview, you can get from here: http://irfanview.com/ and the second, FlashFXP, though it costs money, is one of the few pieces of software that I don't regret paying for (http://www.inicom.net/pages/en.ffxp-home.php)

 

I don't mean to be a grouch or anything, but I found the ftp commands in ME to be slow and unresponsive. Maybe it was just me, but this macro I made to get around them executes in less than five seconds (the only real delay is the time it takes you to upload your screencap to your host).

 

Here's the code:

<TEXTTYPE:<PRTSCR>>
<TVAR2:01:01:gif>
<MSD:100>
<CLIPSG2:0:F:\screencap\screencap.bmp>
<MSD:100>
<LAUNCHDEL2:0:01C:\Program Files\IrfanView\i_view32.exe<PARAM>F:\screencap\screencap.bmp /convert=F:\screencap\screencap.%T1%>
<LAUNCHDEL2:0:01F:\bcmd\flashfxp\FlashFXP.exe<PARAM>F:\screencap\screencap.fqf>
<BEGCLIP>
<TEXTTYPE:=url to my hosting=/screencap.html>
<ENDCLIP>

 

and a screencap...

script.png

What it does is wait for me to press alt+insert (or ctrl+alt+insert, that one takes a screencap of only the window in focus)

It then hits printscreen (or alt printscreen, as the case may be)

sets a variable to .gif (I was playing around with this, it was an easy way to pick a different file extension if I wanted/needed it, it's really unnecessary)

Then, it saves the clipboard to an image

Then, runs irfanview with parameters F:\screencap\screencap.bmp /convert=F:\screencap\screencap.%T1% (Because the clipboard does NOT like saving to a gif file.)

And then runs flashfxp with parameters F:\screencap\screencap.fqf which is a queue file. All you have to do to create one of these is put your screencap picture in a queue, and then, in flashfxp, pick "queue"->"save queue"

Then finally, it copies the direct link to my screencap onto the clipboard for easy use in AIM conversations etc.

 

On my webspace, I set up a simple html file to show the gif file and anything else I might want (at one time, I had more than one computer that could take screenshots, they would save as screencap1,2,3, and the HTML file would show them one after the other. Right now though, it's just showing 1.

 

Also, in options, preferences, transfer, and finally "on transfer completely" you can set flash fxp to close after transfers are done. I did this so that it loads up, transfers the queue file, and then closes immediately.

 

I've also been thinking about setting up a macro to open the screencap file in mspaint before it uploads, so you could perhaps circle or underline something important, or even crop some things out, then when you close mspaint or hit a button the macro continues with the newly changed file. Also, I have a shell extension that lets you copy the path of any file by just right clicking and picking it from the opened menu, I've been thinking about making a macro that prompts for a path, and then uploads that file to my host and gives me a direct URL to it.

Share this post


Link to post
Share on other sites

I've rewritten this to be a little more powerful and easy to edit.

 

Now you simply make the screen grab that you want and enter in an image name. What it will do is check the directory that you have set up to receive the grabs and look for duplicate files. If there is one, it will sequentially add a number, so you could make a bunch of similar screen grabs and they will be named screen-1, screen-2, screen-3, etc. Also, it dates each image, so the names would be more along the lines of '06.06.25-screen-1.jpg, '06.06.25-screen-2.jpg, '06.06.25-screen-3.jpg. This is my basic organization (I have to manage huge numbers of image files for my photography). You can always change the date settings, or remove them completely. Anyway, here's the code if anyone finds it useful.

 

<TVAR2:90:01:-=full file path to local directory=->
<TVAR2:91:01:=-full file path to online directory=->
<TVAR2:92:01:-=ftpserver.ftp=->
<TVAR2:93:01:-=ftp login=->
<TVAR2:94:01:-=ftp password=->
<TVAR2:95:01:-=online/ftp/path/=->
<YY.MM.DD{YP000}{P000}03>
<TMVAR2:10:04:03:001:002:>
<TMVAR2:21:03:00:000:000:%T4%'%T4%>
<TVAR2:01:02:FPlease name the image:FFCenter:Center>
<DVAR2:01:01:1><DVAR2:02:01:1>
<REP3:08:000001:000003:0005:0:01:0>
<IFOTH:01:2:%T90%%T3%-%T1%-%D1%.jpg>
<DVAR2:05:01:1><ELSE><DVAR2:05:01:0><ENDIF>
<IFOTH:01:2:%T90%%T3%-%T1%-%D1%.jpg>
<DMVAR:01:01:1:000000000000001.0000:2:1><ENDIF><ENDREP>
<CLIPSG2:0:%T90%%T3%-%T1%-%D1%.jpg>
<TVAR2:02:01:%T91%%T3%-%T1%-%D1%.jpg>
<TMVAR2:16:02:00:000:000:>
<FTPCONNECT:97:FF:%T92%:00021:%T93%:;RM>
<TBOX4:T:3:CenterCenter000278000160:000:Status.%T97%
Changing Directory...><TBCLOSE:Status>
<FTPCHDIR:98:%T95%><TBOX4:T:3:CenterCenter000278000160:000:Status..%T97%
%T98%
Uploading image...>
<TBCLOSE:Status.><FTPSEND:99:B:%T90%%T3%-%T1%-%D1%.jpg><TBOX4:T:3:CenterCenter000278000160:000:Status...%T97%
%T98%
Success! %T3%-%T1%-%D1%.jpg uploaded.>
<TBCLOSE:Status..>
<FTPDISCONNECT>
<TBOX4:T:3:CenterCenter000278000160:001:Status....%T97%
%T98%
Success! %T3%-%T1%-%D1%.jpg uploaded.
Clipboard set to:
%T2%
Paste away!>
<TBCLOSE:Status...>

:lol:

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

×