Amerifax-Bob Posted July 11, 2020 Report Share Posted July 11, 2020 I'm able to execute my program, go into it and use it and then close it. When I close there was an error message underneath it:Script ErrorThe following error was encountered: Windows could not be found Macro Name: CintaNotes-Open Line Number: 1 Here is a sample of the code from Direct Editor: <ACTIVATE OR LAUNCH Title="Activate or Launch" Exact_Match="FALSE" Wildcards="FALSE" Path="A:\\PRG\\Notes\\CintaNotes\\CintaNotes.exe" Mode="\x00" Default_Path="FALSE" Wait="1" Not a clue why. Bob Quote Link to comment Share on other sites More sharing options...
acantor Posted July 11, 2020 Report Share Posted July 11, 2020 Is this really the path? A:\PRG\Notes\CintaNotes\CintaNotes.exe I haven't seen a path to an A: drive in nearly 25 years! A:\lan C:\antor Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted July 12, 2020 Author Report Share Posted July 12, 2020 Yes. I can actually click on CintaNotes in this directory and execute. I can also past it into WIn+R and also execute. In Activate or Launch\Advanced\Program/Path name: A:\PRG\Notes\CintaNotes\CintaNotes.exe Also activates. Here is the macro I'm using: Activate or Launch Options Select the window command: Activate the window if it exists, otherwise launch the program Window Title: Activate or Launch Partial Match Activate or Launch Program-Program Program/name: A:\PRG\Notes\CintaNotes\CintaNotes.exe Run Mode: Normal Scope Window Title: CintaNotes The window must be on top (which it is) The title is a partial match Do not include hidden windows Program Name: A:\PRG\Notes\CintaNotes\CintaNotes.exe The program must be on top I also going to CintaNotes to make sure the options are set to be friendly with MEP Options\Windows\Always on Top & Minimize to system tray and Close to system tray are turned off. But, when I run debug in the Macro Express Pro Script Editor I get the following error message:On Error: Window could not be following (0X0006) Activate or Launch This when I debug My Results when I execute the macro, Using, Run Macro Now Strange as it seems: It does allow CintaNotes to load, allowing me to open and close notes. When I exit CintaNotes that's when I see the error the message box, as I listed in my original message. Bob Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted July 12, 2020 Author Report Share Posted July 12, 2020 In regards to the A Drive, I have been using both A & B Drive's for about 10 years or more. I try to put as little as I can on the C drive for backup purposes. The A drive holds most of my valued data while the B drive wholes my temporary backups. A for Actual valued data B for BK Backup files before they are moved to the X drive which is the final resting place for my backups. At least until moved to an external drive . Not too original but to each their own I guess, right. Bob Quote Link to comment Share on other sites More sharing options...
acantor Posted July 12, 2020 Report Share Posted July 12, 2020 What happens if you change the Scope to "Global"? Quote Link to comment Share on other sites More sharing options...
Cory Posted July 13, 2020 Report Share Posted July 13, 2020 Ever since floppies went out of style I've used my A and B letters. I will always make my OS drive C because eventually I'll find someone who assumes that the OS drive is C in their software, but my main data drive is A. Why would you want to forsake A and B? Bob you might try running MEP with admin privileges. In a few cases I've had to resort to using TaskKill. You might want to check it out. I hope you get MEP to work first, but in the event it doesn't this works well. Quote Link to comment Share on other sites More sharing options...
Cory Posted July 13, 2020 Report Share Posted July 13, 2020 If you are active in the application, have you considered closing it by using it's commands? Or have you considered using the Windows keyboard shortcut Alt+F4. That is the same as clicking the X in the upper right of a WinForm. Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted July 13, 2020 Author Report Share Posted July 13, 2020 acantor -I get the same error message when I close the called program, CintaNotes. Bob Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted July 13, 2020 Author Report Share Posted July 13, 2020 Cory - I'll check Admin. Bob Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted July 15, 2020 Author Report Share Posted July 15, 2020 Cory, I have been running MEP as an admin. Actually I'm always been admin. Bob Quote Link to comment Share on other sites More sharing options...
hpbdesign Posted July 25, 2020 Report Share Posted July 25, 2020 Hi all, I am stuck hope someone can help me please. This is my Macro to close a search control: <WAIT FOR CONTROL Control="%Error1%" Option="\x06" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="<ENTER>"/> <IF CONTROL Option="\x06" Variable="%Suche ergebnislos%"/> <GET CONTROL Flags="0" Program_Name="EXCEL.EXE" Class="#32770" Title="Microsoft Excel" Control="\"OK\",\"Button\"" Variable="%Suche ergebnislos%" Caption="Microsoft Excel" Partial="FALSE" Wildcards="FALSE"/> <SET FOCUS Control="%Suche ergebnislos%"/> <TEXT TYPE Action="0" Text="<ESC>"/> <TEXT TYPE Action="0" Text="<ESC>"/> <END IF _COMMENT="1"/> Once the control is focused it closes the Control, the problem I have got is that once the control is not displayed I get the error control does not exist. No matter what I have tried I cant seem to catch that error message. What would be the correct way to capture the error message "Control does not exist" please. Kind regards Hans Peter Betzler Quote Link to comment Share on other sites More sharing options...
Cory Posted August 16, 2020 Report Share Posted August 16, 2020 Hans I suggest in the future you create a new post for a new topic. As I recently explained, all commands that have a potential for failing should use the "Catch Error" commands. Whatever exception can be thrown by a command can be handled here without crashing the program. But you should also be putting to condition existence in a logic block. If Control Exists, Else. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.