forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Closing MSPaint

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Tue May 11, 2004 2:03 pm    Post subject: Closing MSPaint Reply with quote

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
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue May 11, 2004 4:23 pm    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Tue May 11, 2004 4:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Wed May 12, 2004 7:51 am    Post subject: Reply with quote

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 Embarassed but how about using a captionless borderless dialog with only one custom 'close' button that always stays on top of the real close button? Razz
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Wed May 12, 2004 11:16 am    Post subject: Reply with quote

That sounds great Protected but how would I do that?
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Wed May 12, 2004 11:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group