Screen Capture Condition ?!

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Automation_Sensation
Newbie
Posts: 4
Joined: Mon Jul 26, 2010 5:44 pm

Screen Capture Condition ?!

Post by Automation_Sensation » Mon Jul 26, 2010 5:54 pm

Hello All,

I am fairly new to automation and am only beginning to get a feel for the power MacroScheduler has.

I am attempting to have a macro identify that it's job is completed and terminate itself instead of including wait times.

I do a database update in TeraData and when it is finished, it says "Complete" in the bottom left corner. I am trying to get MacSched to notice this word and terminate or continue to wait. My very basic code looks like this.

Label>ScreenGrab
wait>1
GetTextReset
GetTextInRect>0,0,0,0,strText1 //I have the actual coordinates specified
MessageModal>%strText1%


if>strText1="Completed",completed,waiting

Label>completed
Do something based on being completed
Goto>end

Label>do something else, the job is still processing.

Label>end
end


I would greatly appreciate Any and All Help.

Thanks,

Steve

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

Post by adroege » Mon Jul 26, 2010 6:03 pm

If GetTextInRect doesn't work try FindImagePos


Another avenue to explore...

Do you have an ODBC or OLEDB driver to TeraData?

If so you might be able to code the update directly in Macro Scheduler and bypass any GUI refresh/automation issues.

Automation_Sensation
Newbie
Posts: 4
Joined: Mon Jul 26, 2010 5:44 pm

Post by Automation_Sensation » Mon Jul 26, 2010 6:31 pm

Very Interesting idea! Yes I am using an ODBC connection, I will use the Mac Sched help to try and code the connection.

I will post m results!

THANKS!!!!

adroege wrote:If GetTextInRect doesn't work try FindImagePos


Another avenue to explore...

Do you have an ODBC or OLEDB driver to TeraData?

If so you might be able to code the update directly in Macro Scheduler and bypass any GUI refresh/automation issues.

Automation_Sensation
Newbie
Posts: 4
Joined: Mon Jul 26, 2010 5:44 pm

ODBC CONNECTION FOR TERADATA

Post by Automation_Sensation » Mon Jul 26, 2010 7:16 pm

I used to following to try and connect.

Let>str=Driver={Teradata};Server=MyServerName;Port=1433;User=admin;Password=xxxx;Option=3;

DBConnect>str,dbH


I get the following error: ODBC TERADATA DRIVER - Not enough information to log on.

Suggestions???

Thanks Folks.

Steve

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Jul 26, 2010 7:53 pm

I don't have nor do I know anything about TeraData. But looking at the info on http://connectionstrings.com/teradata I don't see that your connection string matches any that are listed there.

User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Post by Djek » Mon Jul 26, 2010 8:38 pm

You may try to use the already existing and working odbc system DSN in windows
for instance:
DBConnect>DSN=name-of-connection;,dbH

hth
rgrds
Djek

Automation_Sensation
Newbie
Posts: 4
Joined: Mon Jul 26, 2010 5:44 pm

Post by Automation_Sensation » Thu Jul 29, 2010 2:26 pm

Djek wrote:You may try to use the already existing and working odbc system DSN in windows
for instance:
DBConnect>DSN=name-of-connection;,dbH

hth
rgrds
Djek
Thanks for the suggestion but I'm not having any luck. I keep getting the error "Data Source Name not found". I am sure I have the correct name. (same as in my ODBC connection)

I've tried a million different variation from connectionstrings.com without any luck.

I am attempting to make either an oracle and/or Teradata dsn connection. Has anyone had any luck?? If so, what does your connection string look like?

Thanks so much.

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

Post by Marcus Tettmar » Thu Jul 29, 2010 2:29 pm

This site shows some Teradata connection strings. None look like the one you posted:

http://www.connectionstrings.com/teradata
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