Jump to content
Macro Express Forums

How do I select a specific running program?


bridgette

Recommended Posts

I know this may be a little confusing so I will try to explain myself as clearly as possible (sorry if this is long and detailed).

 

I work with severely disabled students, setting up assistive technology computer systems to encourage greater independence and to allow use of the computer using varied input devices. Most of the more disabled kids can only use 1 or 2 switches (big buttons) as computer input.

 

For the activity I’m working on at the moment, I’m setting up 2 switch input to play media (videos and music) on the computer. I’m using Winamp as the media player.

I can set up Macro Espress to see my switch input as a keypress (b = next video x = play). So, with one switch hit, Macro Express will send a b then an x to make the next song play.

 

In this activity:

Switch 1 – selects a preferred playlist from Winamp player 1

Switch 2 – selects a preferred playlist from Winamp player 2

 

Winamp is set to play each media clip manually so the student has to start up the media clip by clicking the switch.

 

However, this is where my question is:

I want my students to make selections with each switch. I want to have 2 instances of Win amp running – each one with a folder of media to play. 1 player will have a folder of preferred media (fun, interesting media clips). The second player will have non preferred or neutral media, things that the students won’t have much interest in.

 

So, with two instances of Winamp running, can I get Macro Express to select one instance? I know about Alt-tab keyboard shortcuts, but that won’t work because Winamp put the player, and the equalizer and the media screen into the tab list – so too much change for the alt-tab sequence to go wrong there. I ‘could’ do cntrl-alt-del and then up or down arrow, but that worries me because cntrl-alt-del opens up a dialog box with too many other tabs, and again the possibility that there could be some errors in the running of the macro. So – the bottom line question is:

Is there a way that I can get Macro express to select a specific Winamp program? I can’t say switch to program and give a window title because both windows have the same title.

 

 

Can anyone help with the details of getting this set up please?

 

Thanks,

Bridgette

Link to comment
Share on other sites

You have a good problem but I do not have WinAmp so I’m not sure what to suggest. But before I get to that I would like to make an out of box suggestion. Instead of interacting with WinAmp why not just have ME play the audio for you? If it’s a WAV file or can be converted to one you can use the Sound Wave File but if it’s an MP3 then you need to use the Video Play Clip. I know, it says “Video” but it works for any audio your MM Player will play. Another approach would be to simply launch the MP3 file like you would a program. Whatever program is associated with the file extension will launch. Like this:

 

<LAUNCHDEL2:0:01"C:\Media\Popular Music\.38 Special\1987 Flashback  The Best Of .38 Special2 - Hold On Loosely.mp3">

 

Or if it’s not the default launch winamp from here and set the file name as a parameter like this:

 

<LAUNCHDEL2:0:01"c:\program files\winamp\winamp.exe"<PARAM>"\\phaedrus\data\Media\Popular Music\.38 Special\1987 Flashback  The Best Of .38 Special2 - Hold On Loosely.mp3">

 

Usually you don’t need to “Activate” a window either as it will launch in the existing window.

 

You can copy those bits of code to your clipboard and paste into ME’s scripting editor to see the actual command.

 

BTW, I’m guessing you probably know this already but there are a lot of cool keyboards and other input devices out there for the disabled.

 

I’ve dealt with having multiple windows of the same title before but in your case I’m not sure what one can do. I’ll have to think on this one.

Link to comment
Share on other sites

Thanks for the suggestions. Problem is - I have Winamp looking at an entire folder of media files (video or audio) so that I can switch out the media frequently but still have the structure of the macro set up so that winamp will play lists of files in the folder. So, selecting a few video files to play one at a time won't really work. I have actually played around with having the mouse move and click on each instance of the program, then do some of the keyboard input for running. I'm moving along here :-)

 

Thanks for the input.

Yes - I do know about all the keyboards - we use them frequently for different kids. :-)

 

Bridgette

Link to comment
Share on other sites

You could use the 'Repeat with Folder' command to get a list of files (video or audio) in a folder. Then the macro could play each one.

 

A tip that might help is that you can actually 'execute' any file that has an application associated with it. In other words, if the .mp3 file extension is registered with winamp you can click on a xxx.mp3 file and winamp will run it. Inside Macro Express you can use the Program Launch command to simulate clicking on the xxx.mp3 file. This is a shell of a macro that might work:

Multiple Choice Menu: Choose media

If Variable %T1% = "A"
 Repeat with Folder
Program Launch: "%T2%"
 Repeat End
End If

If Variable %T1% = "B"
 Repeat with Folder
Program Launch: "%T2%"
 Repeat End
End If

Copy and paste this into Macro Express:

<MENU2:2:T:01:CenterCenter:Choose mediaChoose mediaPlay favorites media files
Play non favorite media files><REM2:><IFVAR2:1:01:1:A><REP3:07:000001:000001:0002:0:01:c:\favorites><LAUNCHDEL2:0:01%T2%><ENDREP><ENDIF><REM2:><IFVAR2:1:01:1:B><REP3:07:000001:000001:0002:0:01:c:\non-favorites><LAUNCHDEL2:0:01%T2%><ENDREP><ENDIF>

Link to comment
Share on other sites

I know my suggestions aren't the type of answer you're looking for but to be honest I'm stumped on how to switch between windows of identical names.

 

Since you have several files in a play list my earlier suggestion won't work but most media players save play lists in a file and you can actually launch the PL instead of the MP3 file. So just like with my previous example but make it point to the PL instead of the MP3.

 

But back to what you're specifically looking for it's a real problem. As far as I know ME can do things like getting list of processes and windows but if you command it to go to WinAmp it will always plow thru the list and open up the first one. So even if we could use a control that is distinctive we can't tell ME to go there. ALT+TAB as you pointed out even for a human so it's not going to be workable for ME. And I can't fault WinAMP either because generally media players are designed to run in only one instance. So I think you need to figure out how to make your setup work with one instance either from this suggestion or Kevin's.

Link to comment
Share on other sites

Thanks for all the different suggestions... I'll be working on that in the next couple of weeks to try and get this system up and running. this is a learning process all long, trying to learn how the program works and getting the whole system in place.

 

 

 

 

Thanks,

Bridgette

Link to comment
Share on other sites

Hi Bridgette

I think this is what you're looking for, create 2 playlists (.m3u) in winamp, i assume you know how otherwise i can guide you. Make a playlist and add the interesting stuff (movies and mp3 etc.) and the other one with not so interesting stuff. Place (Playlist1.m3u) in perhaps C:\Playlist1 and the second playlist in C:\Playlist2. Make 2 macros one for each playlist to launch, set hotkey (Properties/Activation) on first macro to Keypad1 to launch Playlist1 and Keypad2 to launch Playlist2.

 

Paste the code into the Direct Editor of each macro.

 

Playlist1 macro

 

<LAUNCHDEL2:0:01C:\Program\Winamp\winamp.exe<PARAM>C:\Playlist1\Playlist1.m3u2>

 

Playlist2 macro

 

<LAUNCHDEL2:0:01C:\Program\Winamp\winamp.exe<PARAM>C:\Playlist2\Playlist2.m3u2>

 

I hope this will do the trick.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...