Closing a Program

Show off your agent, and find out about other agents.

Moderator: Staff

Closing a Program

Postby billmele » Thu Dec 20, 2007 6:47 pm

I know how to open a program using the Run command in the Verbots Output but is there a way to close the previousally opened program using Verbot. I am trying to get away from using a Mouse. I would really like to do more but this would be a good start. Example would be to open Windows Media player using Verbot and when finished using it to Close Windows Media Player using Verbot.
Thanks,

Bill
billmele
PowerBot
PowerBot
 
Posts: 126
Joined: Sat Mar 19, 2005 4:32 pm
Location: North Carolina

Postby leseur sylvain » Thu Dec 20, 2007 6:58 pm

Great idea. Some time ago i thought the same kind of
possibility with copy and paste.
Ex:
I select a section mark/paragraph on Web page then i
ask to my Bot
"Put the select text in rule AAAA"

Friendly
Sylvain
leseur sylvain
OmnipotentBot
OmnipotentBot
 
Posts: 1677
Joined: Mon Nov 08, 2004 4:53 pm
Location: Suburb of Paris France

Postby billmele » Fri Dec 21, 2007 5:13 pm

Thanks Sylvain, I will have to think about this idea you have.
Thanks,

Bill
billmele
PowerBot
PowerBot
 
Posts: 126
Joined: Sat Mar 19, 2005 4:32 pm
Location: North Carolina

Postby Somniator » Fri Dec 21, 2007 8:41 pm

Apparently closing external programs using c# isn't that easy because there are different ways of terminating an application and some of them refuse to attend the order because a dialog is open or one or more documents are not saved or whatever.

So there are a bunch of imponderablenesses that have to been taken into account when trying to program a 'close external program' routine.
Sometimes the exit command is the best one, sometimes you have to kill the process.
Somniator
MightyBot
MightyBot
 
Posts: 260
Joined: Mon Jul 17, 2006 10:22 pm

Postby monkyman1984 » Wed Dec 09, 2009 3:22 am

there may be an alternative if there is some complication with the programming,

I'm no good at programming but problem solving is my specialty.

if there is a possibility for verbot to maintain selection of the current open program, usually the default for the computer is to maintain this selection, then it should be able to utilize the minimize maximize functions (my apologies if this is already discussed elsewhere, I'm new)

that being said, it may also be possible to use coordinates in conjunction with the mouse click (assuming verbot can operate a mouse click, there again I'm new)

then it should be able to maximize and use a default for the top right corner mouse click to close many things, etc, etc,


as I've mentioned, I'm new, but thought I would throw my 2 cents at it for the advanced members to chew on,
let me know if any of these features sound plausable
monkyman1984
NewBot
NewBot
 
Posts: 3
Joined: Tue Dec 01, 2009 3:47 am

Postby billmele » Wed Dec 09, 2009 6:48 pm

Matt added some hotkeys back in 2006 but there are only 4 of them and they will not open or close a program. I used a script editor to create closing and navigation keys for Windows Media Player. I then converted them to .exe files so anyone can run them. I use AutoHotKey a free script creator language which comes with it's own editor, converted to .exe files, and many many more extras. The website is located at
[url]/http://www.autohotkey.com[/url]

The documentation is great and the forum is active and helpful with loads of examples. A script file to open and navagate a program would be about 1k each for simple commands like file, back, forward, and play. If converted to .exe each file would be about 198k .

To shut down a program requires you to acquire focus on that program then initate the close down command. Acquireing focus without a lot of programing is not to difficult but you have to be willing to compromise on esthetics and allow the program to flash open, focus, to execute your command an return to a minimized file, assuming it was minimized, while it closes down. That is unless you want it maximized after executing the command then you need another command or simply run the first command such as play then run another command that would maximize the program while it is playing. I know this is confusing but if you can not gain focus the program can not be controlled. Try looking at these scripts at http://www.autohotkey.com/forum/search.php?mode=results
There are no perfect answers. We have asked for the ability to run Windows Keyboard Shortcuts many times and if you had them you would still have the Focus problem to deal with. Good luck!!
Thanks,

Bill
billmele
PowerBot
PowerBot
 
Posts: 126
Joined: Sat Mar 19, 2005 4:32 pm
Location: North Carolina

Postby POWERPLAY07 » Mon Mar 01, 2010 1:59 am

Why don't you ask Matt about it ?

Seeya :oops: :wink:
Tom
POWERPLAY07
MightyBot
MightyBot
 
Posts: 168
Joined: Fri Feb 27, 2009 7:47 am
Location: Adelaide, South Australia


Return to Agents

Who is online

Users browsing this forum: No registered users and 0 guests