| View previous topic :: View next topic |
| Author |
Message |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue May 11, 2004 2:03 pm Post subject: Closing MSPaint |
|
|
Anyone know how to automate MSPaint to close and save a file without the crazy amount of conformation boxes.
when you close mspaint with a image loaded you get three conformation boxes.
1. Save changes window with YES | NO | CANCEL - select yes
Then you get a
2. Save as dirdlg box asking you if you want to save - select yes
Then one more box
3. Do you want to replace file - select yes
Ok now you’re done
What I would like is if someone knows how to simplify this a little when a user closes the window. For example when mspaint generates a close event a vds app sends the keys to mspaint or something. Also DDE would be a good solution but I don’t know how to send DDE to mspaint or if it event supports it. |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue May 11, 2004 4:23 pm Post subject: |
|
|
I don't know if mspaint supports OLE automation - even if t does vds does not. I would think in terms of Sending keys to mspaint to close from a vds app which may be mde to run only as a taskicon. When uses presses a hotkey - your vds app will send keys to mspaint and it's confirmations boxes in sequence to close it.
I am a litle busy. May be some one may post a code to do what I said. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue May 11, 2004 4:36 pm Post subject: |
|
|
| I've found that ctrl + s works. It saves without any prompts. Next step is to tie that to the close button on mspaint. Anyone? |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Wed May 12, 2004 7:51 am Post subject: |
|
|
Oh, your idea is to trigger an automated no-prompt image saving whenever the close button in the mspaint window is clicked?
It's a clumsy solution but how about using a captionless borderless dialog with only one custom 'close' button that always stays on top of the real close button?  |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Wed May 12, 2004 11:16 am Post subject: |
|
|
| That sounds great Protected but how would I do that? |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Wed May 12, 2004 11:50 pm Post subject: |
|
|
Would this work? It would have to remain running in the background:
| Code: | option decimalsep,.
%%paint = @winexists(Paint)
if @not(%%paint)
repeat
wait 0.1
%%paint = @winexists(Paint)
until %%paint
end
window send,%%paint,@cr() |
|
|
| Back to top |
|
 |
|