Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Posts posted by Cory

  1. Since it's a virtual window I don't think what you think is the title is that for the system. I'm guessing MEP is seeing the correct window title which is hidden. The window title you're seeing is the one runnon on the virtual server. If that's the case, then you will not be able to access that string of characters. Activation using that code will not work. 

     

    acantor: calee showed what that string is in a prior post. It had "Remote" at the end of it and the string is not visible. 
    (what is it with lower case these days... 🙂 )

     

    I think your best bet is to find something that has that code available and can be collected. I would use a control like the one you mentioned where a barcode was also visible. Trigger the macro on the appearance of that control, collect the text from that control, evaluate it for the desired sting, and if apparent issue the warning or whatever you want to do. Note that all but your annunciation at the end will be instantaneous and invisible to the user. 

     

    My concern is that a virtualized app is probably just graphic depicting the app running elsewhere. There might just be one big control showing a graphic. Like a video player. When you click on a button, you're actually just creating an even to send a click to the remote app at that coordinate. All your inputs are being executed by proxy. If so, MEP will not be able to access the real control on the server. However sometimes there will be a pass through for printing, file savings, and clipboard, just like in a VM or remote control app. If so you could use the VM apps invisible title as activation, then do something with the keyboard or mouse like Ctrl+A, or click on a coordinate to highlight the text in the remote control, fire a Ctrl+C at it, and then have it copy and transmit the text to your local clipboard for evaluation. There might be some delays so I would start experimenting with at least 100 ms delays between steps then reduce them as far as reliable. 

    If I were you I'd first see what the MEP Windows Controls commands identify with the picker tool and then see what text I could get from there. Also it will show you want to local (accessible) window title is. In this graphic you can see the title of the window for which control I was selecting was "Macro Express Pro - Script Editor [Test]:". Show us what you find if you need more help.

    Capturecontrolgraphic.png.859d9ac276bd91755f04855dd234bda9.png

     

  2. Remote... This sounds like it's a virtualized app like VMWare's Thinapp. Like a VM (virtual machine) but for an app. If so, you're not really in the app. This is a program that essentially gives you a window into an app that's running on a server someplace, typically the cloud. Is this the case? You might want to look and see what the name of the actual process is with Process Explorer or Task Manager.  Is this the case?

  3. 5 minutes ago, acantor said:

    Cory might be correct that this is a Unicode issue, but let's make sure this is not a coding issue.

    I doubt it as the break is happening in the middle of a string of numerals. But there are some. Like a zero with a slash through it. Also unicode extended characters just use two bytes where MEP decodes them one byte at a time. So one typically sees two garbage characters then it continues.

    Aside: I have successfully used MEP with Unicode by employing some replacements as a workaround. 

  4. If it's a normal Winform window one can probably get all the text easily using the Windows Controls commands in MEP and launch a warning if the control text contains the code. You could also use the control as the activation. This would all happen in a few milliseconds and invisible to the user if one didn't pop up a message.

    I could also imagine one could save a graphic with the clipboard and do something with it. 

  5. That is strange. I'm sure it's not an MEP militation, but it's odd that it can't get the whole title. Like I said, it might be that the 8 is a unicode character or something like that. 

    Are there any other controls on the window? Like a status bar at the bottom? THen you could do as rberg suggested and have it invisibly check that for the ID you want to have trigger. 

  6. Testing.
    Using the Set Variable from Window Title did not truncate the long window title. 

    I used Repeat With Windows command and the long window title was not truncated as you described.

    Again... GIve us an sample of the title which is failing. 

    I also recommend you make a small macro to grab the text of the top window and display it in a message box to see for yourself. 

     

  7. I created a WinForm app and set the windows title to

    "This is a super long window title and I can't imagine any developer making it longer than this This is a super long window title and I can't imagine any developer making it longer than this This is a super long window title and I can't imagine any developer making it longer than this 1234321"

    And made the activation for a window title containing text 1234321 and it works fine. I suspect you're jumping to conclusions that MEP is limiting it depth of characters searched. I believe your problem is something else.

    As rberg said it would be more helpful if you provided the actual text. 

    One though I had is perhaps the title contains unicode characters. MEP processes unicode data as if it's ASCII and is difficult when the character is an extended one. 


     

  8. Yes. However I recommend using a tab delimiter instead. This avoids needing to qualify text with quote marks. BTW this is native for the tabular exchange of Microsoft products. So you can build the big string of tabular data with tabs, carriage returns, and line feeds and either save it to a TSV or paste it into Excel where the entire table will be inserted in one action. I've written some one this in these articles. 

    Process Tabular Data in Variables

    CRLF and TAB

    Macros If you have any other interests. 

     

    If you do a lot of this sort of thing, you might want to go to the next level. I started with web automation with MEP but now due to the huge volume I do, I have .NET programs that do the work. But without having to learn a programming language there are ways to send information to a web form handler directly with a request. This requires no web browser so much simpler, faster, and more reliable. Also timing problems go away. Most web forms send their data in a HTTP POST request but some use GET. Natively MEP can only send a GET request but many form handlers will also accept the data in the parameters of a URI in a GET request. Also one can make a simple script one can use in a External Script command in MEP. If you have any interest in that, feel free to send me a PM or respond here.
    I'm also available for hire and am willing to teach or do. I give free consultations, often enough for one to get going on their own. 

  9. It depends on what you're doing. Are you using a timing control? "Wait for"? 

    In your code, what is waiting?

    Often for web pages I'd test for something in a loop with a small delay and once the condition is met, set a boolean variable for success, and advance. If it goes to the loop limit, it exits and sees the Boolean indicates a failure and handles that. Like a 1 second delay in a loop for 300 times.

    It would help if you gave us more details about what you're doing. 

×
×
  • Create New...