[SOLVED] AutoIt script to give focus to a running program?

Forum discussing Intelliphone iPhone/iPod/iPad/Android Client for Intelliremote

[SOLVED] AutoIt script to give focus to a running program?

Postby kdeuce7 » Sat Oct 04, 2008 7:40 pm

First off... I love the program. I'm using this on my new Ipod touch and it's awesome.

The only problem I'm having is in order to control my HTPC program (Meedio) I need to have 'focus' of it. I've never messed with autoit but tried tonight with no success. I'm thinking I need to us a 'winactive' or 'winactivate' command but not sure how to form it.

Basically I want to be able to push a button on the touch and have it give my HTPC program focus.

Thanks!


PS- Looking forward to the possibility of custom icons and ability to customize their location. There are alot of icons I don't need so it's just clutter.
kdeuce7
 
Posts: 2
Joined: Sat Oct 04, 2008 7:32 pm

Re: AutoIt script to give focus to a running program?

Postby Melloware » Sat Oct 04, 2008 10:37 pm

Try...

Code: Select all
WinActivate("Meedio", "");


Where "Meedio" is the name of the Window title. For example to activate Notepad its WinActivate("Untitled - Notepad", "")...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11091
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: AutoIt script to give focus to a running program?

Postby kdeuce7 » Sat Oct 04, 2008 11:59 pm

Thank you!

Not only for the quick reply but it worked perfectly.

I was putting -- WinActivate("Meedio") -- and getting errors. Just missing a few characters I guess.

Thanks!
kdeuce7
 
Posts: 2
Joined: Sat Oct 04, 2008 7:32 pm

Re: AutoIt script to give focus to a running program?

Postby Melloware » Sun Oct 05, 2008 8:03 am

kdeuce7 wrote:Thank you!

Not only for the quick reply but it worked perfectly.

I was putting -- WinActivate("Meedio") -- and getting errors. Just missing a few characters I guess.

Thanks!


Yeah you have to look at the API for AutoIt in the Start->Programs->Intelliremote->AutoItX3 Help File. In there you can see all the documentation and parameters. You were just missing the the second parameter of the "" empty quotes.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11091
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA


Return to Intelliphone

Who is online

Users browsing this forum: No registered users and 2 guests

cron