Jump to content
Macro Express Forums
Cliff S

Launch an Open A Window ver 3.9a cannot find window title

Recommended Posts

I'm running ver 3.9A on Windows 10 Home. I need to create a macro to launch a program and open it's window. The program responds with a message that the Window Title does not exist. I thought that the Window Title was found in the upper left hand corner each window. Is this incorrect. if not where is the title located. I also tried unchecking the title search box. It still failed to work. Is their another issue that causes this problem? Tnx

Share this post


Link to post
Share on other sites

My version is 4.7.1.1 but I doubt it makes much difference - yours will prob be okay.

 

I tried it using the Quick Wizard method, and succesfully launched a sound editing program I use, called Audacity.

When asked to identify the program, I took the trouble to actually go and locate the exe file of it,  in its folder.
(You can either browse in the Windows folder or the Windows x86 folder, or instead look at the icon that launches it, right click, and see the path for it.)

I also specified a keyboard shortcut, in this case I chose Ctrl Alt Shift Backspace.

When I did that shortcut, bingo, up came Audacity.

My version is 4.7.1.1 but I doubt it makes much difference - yours will prob be okay.

 

I tried it using the Quick Wizard method, and succesfuliy launched a sound editing program I use, called Audacity.

When asked to identify the program, I took the trouble to actually go and locate the exe file of it,  in its folder.

I also specified a keyboard shortcut, in this case I chose Ctrl Alt Shift Backspace.

When I did that shortcut, bingo, up came Audacity.

 

Share this post


Link to post
Share on other sites

Here is a ME Version 3 macro that displays an alphabetic list of all current windows that it can find.  It may be helpful to you.  I have found with Windows 7 -- probably with Windows 10 also -- that there are many, many "windows" that you never ever see.  The same window title may appear many times; the macro only lists it once, with a counter of how many times it occurs.  The macro also tries to determine which window is "on top", though sometimes it finds more than one on-top, and sometimes none -- I don't know why, ask Bill Gates.    

 

<LOGFILE:YY:Macro name: 0_Display_Open_Windows><LOGERR:N><REM2: ><REM2:Display all open windows><REM2: ><DIS:<REM2:Save variables used by this macro><DIS:<TMVAR2:19:01:00:000:000:WIN_DISPLAY_SAVE_T1><DIS:<TMVAR2:19:02:00:000:000:WIN_DISPLAY_SAVE_T2><DIS:<TMVAR2:19:98:00:000:000:WIN_DISPLAY_SAVE_T98><DIS:<TMVAR2:19:99:00:000:000:WIN_DISPLAY_SAVE_T99><REM2:Clear T50 which will be used to hold previous window title, and N50 counter><TVAR2:50:01:><IVAR2:50:01:0><REM2:....    set up CR-LF in T98><ASCIIC:98:1:13><ASCIIC:99:1:10><TMVAR2:08:98:99:000:000:><REM2: ><TVAR2:01:01:><TVAR2:02:01:><REM2: ><REM2:Get all window names and populate text file "windowlist.txt", adding end-of-file record all nines after the last window name.><REM2:Nines record will be ignored when the file is read back, due to logic that displays prior record only when next record is different,><REM2:and by virtue of the nines being the last record and the only one of its kind.><DOFILE:08:NN:c:\temp\windowlist.txt>><REPEATWIN:1:1:2><TMVAR2:01:01:00:000:000:><TMVAR2:20:01:00:000:000:c:\temp\windowlist.txtT><ENDREP><TVAR2:01:01:999999999999><TMVAR2:20:01:00:000:000:c:\temp\windowlist.txtT><REM2: ><REM2: ><REM2: ><REM2:First time through repeat loop (or after new value), initialize T50 window title save area><BTFBEG:001:000001:000000:C:\Temp\windowlist.txt><IFVAR2:2:50:1:0><TMVAR2:09:50:01:000:000:><ENDIF><REM2: ><IFVAR2:4:01:1:T50><NMVAR:08:50:0:0000001:0:0000000><ELSE><REM2:....    (use T30 to hold window name before appending instance count and "on-top" indicator.><TMVAR2:09:30:50:000:000:><IFVAR2:2:50:4:1><TMVAR2:07:50:00:000:000: (%N50% instances)><ENDIF><IFOTH:03:1:%T30%><TMVAR2:07:50:00:000:000:   *** This window is on top ***><ENDIF><TMVAR2:08:02:50:000:000:><TMVAR2:08:02:98:000:000:><REM2: ><TMVAR2:09:50:01:000:000:><TVAR2:01:01:><IVAR2:50:01:1><ENDIF><BTFEND><REM2: ><REM2: ><TBOX4:T:4:CenterCenter000632000703:000:List of open windows%T2%><REM2: ><DIS:<REM2:Restore variables used by this macro><DIS:<TVAR2:01:11:WIN_DISPLAY_SAVE_T1><DIS:<TVAR2:02:11:WIN_DISPLAY_SAVE_T2><DIS:<TVAR2:98:11:WIN_DISPLAY_SAVE_T98><DIS:<TVAR2:99:11:WIN_DISPLAY_SAVE_T99><REM2: ><REM2:Done - exit><MRETURN>

Share this post


Link to post
Share on other sites

Bruce, I tried your suggestion. The Macro failed completely. It does look like it your method won't work on Windows 10. Tnx

 

Rberg. I duplicated your macro for creating a list of windows. The macro failed to find any windows, or even an empty list. Tnx 

Share this post


Link to post
Share on other sites
2 hours ago, Cliff S said:

Bruce, I tried your suggestion. The Macro failed completely. It does look like it your method won't work on Windows 10. Tnx

 

Rberg. I duplicated your macro for creating a list of windows. The macro failed to find any windows, or even an empty list. Tnx 

 

The macro works fine for me on both Windows 7 and 10.  Note that the macro writes a temporary file into folder C:\Temp, then reads the file back in.  If you don't have such a folder, I don't know what it will do. 

I think something got lost in my copying-and-pasting from the direct editor.  I can't recreate the macro by copying the above.  Here's the full text, if you want to do all the work of entering it:

Log Message to Default Error Log
Log Errors
//  
// Display all open windows
//  
// Clear T50 which will be used to hold previous window title, and N50 counter
Variable Set String %T50% ""
Variable Set Integer %N50% to 0
// ....    set up CR-LF in T98
Variable Set %T98% to ASCII Char of 13
Variable Set %T99% to ASCII Char of 10
Variable Modify String: Append %T99% to %T98%
//  
Variable Set String %T1% ""
Variable Set String %T2% ""
//  
// Get all window names and populate text file "windowlist.txt", adding end-of-file record all nines after the last window name.
// Nines record will be ignored when the file is read back, due to logic that displays prior record only when next record is different,
// and by virtue of the nines being the last record and the only one of its kind.
Delete File or Files: "windowlist.txt"
Repeat with Windows: Place title in %T1%
  Variable Modify String: Trim %T1%
  Variable Modify String: Append %T1% to Text File
Repeat End
Variable Set String %T1% "999999999999"
Variable Modify String: Append %T1% to Text File
//  
//  
//  
// First time through repeat loop (or after new value), initialize T50 window title save area
Text File Begin Process: "windowlist.txt"
  If Variable %N50% = 0
    Variable Modify String: Copy %T1% to %T50%
  End If
  //  
  If Variable %T1% = variable %T50%
    Variable Modify Integer: Inc (%N50%)
  Else
    // ....    (use T30 to hold window name before appending instance count and "on-top" indicator.
    Variable Modify String: Copy %T50% to %T30%
    If Variable %N50% > 1
      Variable Modify String: Append " (%N50% instances)" to %T50%
    End If
    If Window Title "%T30%" is on top
      Variable Modify String: Append "   *** This window is on top ***" to %T50%
    End If
    Variable Modify String: Append %T50% to %T2%
    Variable Modify String: Append %T98% to %T2%
    //  
    Variable Modify String: Copy %T1% to %T50%
    Variable Set String %T1% ""
    Variable Set Integer %N50% to 1
  End If
Text File End Process
//  
//  
Text Box Display: List of open windows
//  
//  
// Done - exit
Macro Return

Share this post


Link to post
Share on other sites

rberq, I copied and pasted the updated version into the direct editor. The result also did not work. I checked the c drive for a temp folder and found none. I'm concerned that this problems solution is beyond my limited level of computing technology (code). The old saying that "someone with a little knowledge is more dangerous than someone with no knowledge . This may apply to me. it might be best to abandon getting a fix. Tnx

Share this post


Link to post
Share on other sites

rberq, I copied and pasted the updated version into the direct editor. The result also did not work. I checked the c drive for a temp folder and found none. I'm concerned that this problems solution is beyond my limited level of computing technology (code). The old saying that "someone with a little knowledge is more dangerous than someone with no knowledge . This may apply to me. it might be best to abandon getting a fix. Tnx

Share this post


Link to post
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...