Help with If/else regarding text in a box.

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Andrew Parsons
Newbie
Posts: 3
Joined: Tue Aug 09, 2011 9:13 pm

Help with If/else regarding text in a box.

Post by Andrew Parsons » Tue Aug 09, 2011 9:23 pm

Hello All,

First let me say I really like Macro Scheduler, it is power and yet easy to learn.

Here is what i am trying to do:

I am using info from an Access database i build to fill out info on a webpage.
What i am trying to do is have the macro check to see if there is any text in the active text box on the database. if it has text i need it to goto one location. and if it does not i need the script to goto another location.

I understand the goto command and how if/else statements work. I just don’t know how to have it check to see if there is any text in the box.

If anyone could help me it would be greatly appreciated.

Cheers,
Andrew

User avatar
PepsiHog
Automation Wizard
Posts: 512
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

any

Post by PepsiHog » Tue Aug 09, 2011 11:56 pm

There is a command GetText. Type GetText in the editor and select one from the little window. Then to find out more about it, while the cursor is on the command press F1.
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

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

Post by adroege » Wed Aug 10, 2011 2:49 pm

see if there is any text in the active text box on the database
I think you will have better results if you do a SQL query
on your database instead of trying to get the data from a
GUI.

Look up the Macro Scheduler commands

DBConnect
DBClose
DBExec
DBQuery

Andrew Parsons
Newbie
Posts: 3
Joined: Tue Aug 09, 2011 9:13 pm

Post by Andrew Parsons » Thu Aug 11, 2011 8:10 pm

GetClipBoard>stored

Really all i need to do is convet how many characters are in stored to a number. then i will use a if statement with goto. Anyone know what command i need to use to do such a conversion?

Thanks so far for all your help.

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

Post by adroege » Fri Aug 12, 2011 1:44 am

convet how many characters are in stored
This doesn't sound useful......

stored=Bob

how many characters = 3 Is this what you want?

try the Length command

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