Macro Toolworks Products Discussion Forums :: Suggestions & Bug Reports
Welcome Guest   
 Subject :Printscreen problems.. 09-09-2010 23:56:39 
murraymd
Joined: 17-05-2010 03:31:48
Posts: 9
Location
Hi all,

It's nice to writing macros again! I'm currently trying to write a macro that takes
screenshots and saves them as bitmap images using MS Paint. My problem is
that I can't get the printscreen function to work, either on its own or surrounded by
ctrl commands. Does anyone have any suggestions? Thanks,

Malcolm
IP Logged
Malcolm D. Murray
 Subject :Re:Printscreen problems.. 09-12-2010 00:04:35 
GeoD_MTW
Joined: 10-12-2009 08:07:49
Posts: 15
Location
Hi Malcolm,

Here's a macro I use to make copies of my online bank deposit slips. I use a program called Picture Publisher, (PicPub), but you should be able to mod this to make it work for you.

It's also possible MS Paint is being pissy. Pic Pub is so old, it is pre-W95, but it is my 'old reliable' graphics program that always works in a pinch.

GeoD

~~~~

Here's the macro:

<#> pic.pub..create.=.print.screen.image
<#>
<#> This macro creates an image of the current print screen data.
<#>
<#> create image of print screen data
<#>
<cmds>
<varset>("vDestFilePathname=D:\Scripts\Archive\screen.caps\pic.pub..nFo.%_vFileDateTimeTXT%","")
<wx>(250)
<keys><alt><printscreen><alt><cmds>
<wx>(700)
<if_win>("Micrografx Picture Publisher","OPEN",0)
<actwin>("Micrografx Picture Publisher",0,2,"no")
<wx>(800)
<else>
<execappex>("M:\Picture Publisher\Pp70.exe","","M:\Picture Publisher",0,0)
<actwin>("Micrografx Picture Publisher",0,2,"no")
<wx>(800)
<endif>
<waitfor>("WIN","ACT","Micrografx Picture Publisher",10,0)
<wx>(700)
<#> ============== create.=.new.image ==============
<keys><alt>f<alt><cmds>
<wx>(50)
<keys><enter><cmds>
<wx>(300)
<keys>r<cmds>
<wx>(50)
<keys><tab><cmds>
<wx>(50)
<keys>1925<cmds>
<wx>(50)
<keys><tab><cmds>
<wx>(50)
<keys><tab><cmds>
<wx>(50)
<keys>1440<cmds>
<wx>(50)
<begloop>(3)
<keys><tab><cmds>
<wx>(50)
<endloop>
<keys><enter><cmds>
<wx>(300)
<waitfor>("WIN","OPEN","[Micrografx Picture Publisher|PP7|#-9|#-9]\[|MDIClient|#0|#50]\[Untitled|PPMDICHILD|#0|#0]",10,0)
<wx>(500)
<winstate>("[Micrografx Picture Publisher|PP7|#-9|#-9]\[|MDIClient|#0|#50]\[Untitled|PPMDICHILD|#0|#0]","MAX")
<wx>(500)
<#> ============== paste.=.screen.cap ==============
<keys><ctrl>v<ctrl><cmds>
<wx>(100)
<#> ============== save.=.file ==============
<keys><alt>f<alt><cmds>
<wx>(50)
<begloop>(5)
<keys><down><cmds>
<wx>(50)
<endloop>
<keys><enter><cmds>
<wx>(100)
<keys><end><cmds>
<wx>(50)
<keys><shift><home><shift><cmds>
<wx>(50)
<keys><delete><cmds>
<wx>(150)
<varout>("vDestFilePathname",0)
<wx>(150)
<keys><tab><cmds>
<wx>(50)
<keys><tab><cmds>
<wx>(50)
<keys><enter><cmds>
IP Logged
Page # 


Powered by ccBoard


Login and share your experience - send messages to forums and add comments to samples, commands and other resources.



Account is free of charge, easy to setup.