jerz653 Posted October 10, 2014 Report Share Posted October 10, 2014 Hi everyone, I am running into an issue with a macro I am building and I'm not sure if a preference in Windows 7 is the reason or not. I have an application that is running 4 sessions. The macro is set to restore each window and log me in using the keyboard/type text command. After it completes that, it is set to minimize the window and then restore the next one and repeat the process. It seems to run perfectly when the sessions are not grouped together on the taskbar. However, when the windows are grouped, it only successfully logs me into 1 of the 4 sessions. This is being built for several users (hopefully) so I'm not sure what their preferences are as it relates to the taskbar. I was hoping to build this so that it will run successfully whether their sessions are grouped or not. Any help would be greatly appreciated! Thanks! Quote Link to comment Share on other sites More sharing options...
Look_Up Posted October 18, 2014 Report Share Posted October 18, 2014 When all Windows have the same name, MEP get in trouble. But you can try Text Type: Alt+Tab to change the tab. Or "Windows Control" that every windows get his own ID. Can you make a video from your problem ?! Quote Link to comment Share on other sites More sharing options...
acantor Posted October 19, 2014 Report Share Posted October 19, 2014 If the four windows have the same titles, try using Handle variables to uniquely identify them. Quote Link to comment Share on other sites More sharing options...
saleh Posted February 13, 2015 Report Share Posted February 13, 2015 If the four windows have the same titles, try using Handle variables to uniquely identify them. Hi Alan How I can use" Handle variables to uniquely identify windows" ? Thanks Saleh Safarian Quote Link to comment Share on other sites More sharing options...
acantor Posted February 15, 2015 Report Share Posted February 15, 2015 I have this code sample that is supposed to illustrate Handle variables. I am not sure where it came from, but I modified the code. No guarantees that it works! Quote Link to comment Share on other sites More sharing options...
acantor Posted February 15, 2015 Report Share Posted February 15, 2015 // Launch Notebook, and type some text into the window Program Launch: "notepad.exe" (Normal) Parameters: Text Type (Simulate Keystrokes): This is the first Notebook window. Delay: 1000 milliseconds // Launch Notebook a second time, and type some text into the window Program Launch: "notepad.exe" (Normal) Parameters: Text Type (Simulate Keystrokes): This is the second Notebook window. // Enumerate all windows that have "Notebook" in title with a Handle variable Variable Set Handle %hWin% from all windows with the title of "Notepad" Text Box Display: Move one notepad window to a different location so you can see both, then click OK // Activate the first Notebook window Window Activate: %hWin[1]% Text Type (Simulate Keystrokes): <ENTER><ENTER><ENTER>This should be the first Notepad window Wait for Text Playback // Activate the second Notebook window Window Activate: %hWin[2]% Text Type (Simulate Keystrokes): <ENTER><ENTER><ENTER>This should be the second Notepad window 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.