terrypin Posted May 20, 2008 Report Share Posted May 20, 2008 Hi, Could someone point me to a macro that will let me size two panes in an application window please? I've attached a screenshot. I can get the full window to its desired size and position using a program I have called Sizer. But the only way I can resize those two sections on the left is by dragging the mouse cursor. FWIW, when the mouse reaches the left border of the two it changes to something like this: <-||->. And when it reaches the one to the right, it becomes like this: <->. Presumably I need a subroutine (section?) to drag the mouse rightwards from say x=100 px and detect when it reaches the first border. Then drag this border to a point at say x=500. Then do something similar with the second pane. I'm hoping in particular that there is a well-tried macro for the detecting aspect? Any suggestions will be appreciated please. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted May 20, 2008 Author Report Share Posted May 20, 2008 Sorted thanks. It was easier than I expected. For anyone else who ends up here with a similar query, here's the basic routine: // Drags mouse rightwards until cursor changes to colour 13160660 Repeat Start (Repeat 800 times) Mouse Move Position 1, 0 Delay 4 Milliseconds Get Pixel: Under Mouse into %N1% If Variable %N1% = 13160660 Text Box Display: Cursor change 1 Else End If Repeat End Macro Return If there's a neater way, I'd appreciate seeing it please. Incidentally, I first experimented with using the Wait for Mouse Cursor command, set to <-||->. (MacroExpress calls that 'Horizontal Split'. Surely it should be 'Vertical Split'?) Anyway, that just didn't work. Even with the changed cursor showing for several seconds. Yet it did work with the other cursor, <->. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted May 22, 2008 Author Report Share Posted May 22, 2008 Any comment from Macro Express Support on my last point please? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted May 22, 2008 Report Share Posted May 22, 2008 I like your idea of using the mouse cursor for edge detection. Usually I use colors but colors are often different from machine to machine so the cursor idea is brilliant. I don't think you can't use "Wait for Mouse Cursor" because the macro is moving the mouse and it would have already changed by the time it got the to the "Wait For". Generally all Wait Fors must rely on external action to activate them, not something from within the macro. Instead if I were you I would do incremental mouse moves at something like 4 pixels each step (just to save loops)(Needs to be something less than the actual width of the edge) and in that loop break If Cursor is the resize arrows. <REP3:01:000200:000004:01000:1:01:><MMW2:1N,200><IFMOUSE:7><BREAK><ENDIF><ENDREP> Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted June 5, 2008 Report Share Posted June 5, 2008 Terry, I fiddled with your idea and the only thing that I can think of is to use the "capture" feature to drag the mouse after it detects the vsplit/hsplit. You would have to subtract/add to your N variable(which I'm sure you know and get the mouse to drag it for that long until it get to where you want it to go. ________________________________________________________________________________ __________________________ The only problem I am having for myself is the hsplit I am experimenting with is a BLACK SOLID LINE rather that <-||-> with that space in the middle. It's not detecting the solid line hsplit. Why is there NO solid line hsplit/vsplit available? Can any moderator venture to guess? -P Quote Link to comment Share on other sites More sharing options...
kevin Posted June 5, 2008 Report Share Posted June 5, 2008 Mouse cursor styles come from two different sources. Some are defined by Windows itself. However, an application may define one or more unique cursor styles. Macro Express supports all of the cursor styles supported by Windows but, due to technical limitations, it cannot support the unique styles from applications. Wait for Mouse Cursor: Wait for Cursor Change was recently added to allow macros to detect that the cursor changed. This can be used as a work-around in some situations. Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted June 5, 2008 Report Share Posted June 5, 2008 Thanks Kevin! You guys are great! I will try your suggestion and get back with the forum! -P 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.