Got to Text

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
HolyAbsolut
Newbie
Posts: 17
Joined: Wed Sep 21, 2011 10:28 am

Got to Text

Post by HolyAbsolut » Wed Sep 21, 2011 10:42 am

Hi @ all,

I hope this forum is still allive. I only see some very old posts.
Anyway I have a problem. Maybe it is quite easy but I do not know how to solve it.

At the begining of my script I open a dialog where I got various %variables%
this are used in the further script.

Now I insert an unique Nr e.g. "7483932"
Additional I have one list. In one of the rows this Nr is written.
Now I need a macro who find this Nr and goes to this position and click or mark it.

I have now Idea how to solve this.


My second problem with my script is.
At the begining of my script I open a dialog where I got various %variables%
this are used in the further script.

Now i need to open some more dialogs and want to use the %variables% from the dialog before.

e.g.

Please insert %Variable% to field 5.

But instead to insert the variable the send the text "%variable%". what I have to do that this works.

If I use messagemodal> It works perfekt.


I thank you for efforts in advance.


Best Regards

HolyAbsolut

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Sep 21, 2011 12:27 pm

This forum is very much alive! You can't be looking hard if you're only seeing old posts. The posts preceding yours are all from the last few days including some others posted today!

Are you referring to a list box? Usually you can just send the text to the list box to select it. See:
http://www.mjtnet.com/blog/2009/07/02/s ... down-list/

You don't say which version of Macro Scheduler you are using. With v12 the way to modify the property of a dialog object (e.g. populate an object's text with the content of a variable) is to simply use the SetDialogProperty function. See the sample macros or search these forums. Plenty of examples exist.

Also see these video tutorials:
http://www.mjtnet.com/demos/dialogs1.html
http://www.mjtnet.com/demos/dialogs2.html

With older versions of Macro Scheduler you would need to set the dialog object variables and then call ResetDalogAction. It's more tricky but again plenty of examples exist here. My advice is to switch to v12 as it is *MUCH* more easy and also way more powerful.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

HolyAbsolut
Newbie
Posts: 17
Joined: Wed Sep 21, 2011 10:28 am

Post by HolyAbsolut » Wed Sep 21, 2011 6:20 pm

Hi Mr Tettmar,
Nice to see that I was wrong.Thanks for your prompt response.

I checked the links which you send me,great Videos, but it seems that they do not solve my problem.So I try to explain myself better.
I have an sheet like this one.(No Excel sheet!)

Sheet
Row1 Green
Row2 Blue
Row3 Screen
Row4 Taste

Now I´m searching a script who can find for example "Screen" click there so that I can insert the commands
press right*3
send> 04

Do you know any command for such an process?

FYI I use v12.1.10.e

Thanks for your help.

Regards

Maximilian Braun

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 22, 2011 8:25 am

We're in the dark here. What application is this sheet in? Does that application have a search function? The answer may be with the application itself. If you were looking for a value in the sheet manually how would you do it?

Is the text that you are looking for known at design time? Is it just one piece of text or could the string be anything/unknown at design time?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

HolyAbsolut
Newbie
Posts: 17
Joined: Wed Sep 21, 2011 10:28 am

Post by HolyAbsolut » Thu Sep 22, 2011 10:17 am

Hi,
it has no search function.If I have to do manually, I do it manually. I look where is the nr and follow the line on left side and press 1+enter.

What you mean with design time?
It´s all one text.There are no tabs no windows.



Attached a screenshot to have an better idea what i´m talking about.

http://img13.imageshack.us/img13/8257/unbenannttm.jpg

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 22, 2011 10:26 am

To rephrase my question. Are you *always* looking for the same word. Is it always "Screen" or could it be something else. Do you know what the word will be when you write your script?

If so you can use Image Recognition. Capture the word as an image and then use FindImagePos to find it's location on the screen. Then apply an x offset to move the mouse to the right of it and click.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

HolyAbsolut
Newbie
Posts: 17
Joined: Wed Sep 21, 2011 10:28 am

Post by HolyAbsolut » Thu Sep 22, 2011 12:42 pm

No, It is not fix. It will be a %variable% which is insert at the beginning of the script

So I thinks this option does not work. -.-

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Thu Sep 22, 2011 1:17 pm

From your screen shot it looks like you are running a terminal emulator program which is connected to a mainframe application. Many terminal emulator programs have the ability to capture the text which is displayed. Then macro scheduler could simply read this file and parse the ASCII text. Other terminal emulators also have an API that is programatically accessible
which would also work.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 22, 2011 2:06 pm

And if this is a TELNET client then you can avoid trying to manipulate it and use Macro Scheduler's built in Telnet protocol commands.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts