Solved

Scripting 3rd Party Application

Posted on 2003-12-04
6
291 Views
Last Modified: 2010-04-14
First off, I'm not too experienced in scripting. Here's what I need to do:

I'm running a program called HotLine Server (http://www.hotspringsinc.com). It's a free program that creates a community for exchange of files and chat. It has a window with control buttons that include one to reload, which causes it to reread an agreement file that remote users see when they log on. I need to click that button daily.

I tried to use Applescript GUI scripting. To identify the button I tried using UIElementInspector and Prefab UI Browser. The problem is that the buttons don't show up as elements in the window using these tools. The Maximize, Minimize, and Close buttons show as elements, as does the header text, but not the command buttons.

I tried using killall -HUP HLserver19 from a command line but the application doesn't like it. When it comes back the UI isn't running and it refuses connections. Is there any hope?

BTW, this is on a G4 running OS 10.3.1.

Thanks,
Mark
0
Comment
Question by:mwarbeck
  • 4
  • 2
6 Comments
 
LVL 5

Expert Comment

by:Insolence
ID: 9880651
Use QuickKeys!

http://www.cesoft.com/products/qkx.html

Record a script that when that window comes up, it clicks the "ok" button (or whatever).  And then modify the script a little bit to make it infinitely loop, constantly waiting for that program to bring up the window again, just so it can click it.  =)  Isn't technology neat.

I used to use this program on OS-9 for doing this exact thing.  I used it to auto-close AOL disconnect windows, and to click hotline client register notices back with hotline client 1.0.  =P  Hehe... this is their OS-X version, and I just confirmed it works fine with 10.3 with their patch on their website.  =)  Enjoy

 - Insolence
0
 

Author Comment

by:mwarbeck
ID: 9890141
Quickkeys may be an option. I've been playing with it for a few days but can't get the shortcut to run triggered by time and day. I can click the Run button and it executes but no matter what I do with the time it won't run. I close the shortcut editor window, saving the shortcup. I tried leaving the Quickkeys window open and I tried minimizing it. No matter what it doesn't run when the time condition is met. I even set it to run every 5 minutes but it just doesn't run on schedule. The shortcut has three steps: switch to the Hotline Server, click in the title bar of the window, then click on the button. Any ideas as to why it won't run by the schedule?
0
 
LVL 5

Expert Comment

by:Insolence
ID: 9890889
Well, if you're running a hotline server, it should (usually) be on a server that you don't play with often.  It sounds like it's your desktop computer or something.  =P  In this case, good luck man.  If it is a server that no one usually has physical access, Quickkeys will do the job for you, I can guarantee it.  It's really as easy as hitting record, then clicking that OK button (or whatever) then hitting stop.  Then editing the script manually to run infinitely.  That doesn't always work... but if it doesn't, you can always write the script manually.  The quickkeys language is so simple...  =P  Do a "wait for window with title" and put in the title of that window, then do a "wait 2 seconds" or a "wait till system is idle", giving the script enough time for the window to fully come up, then tell it to press the return key, or tell it to move the mouse's coordinates to the button's location, and then click the mouse.  Run this in an infinite loop, and it'll constantly wait for that window to come up, just to click it.  This won't really work if you're trying to use it as a desktop computer and running hotline server in the background though.  =\  With some monkeying around it might...  =P

 - Insolence
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:mwarbeck
ID: 9893304
Actually the test bed is a desktop G4. The actual server is a new G5. I had no problem running the script manually, just by the time trigger. I did three steps: switch to the application, click in the title bar of the window with the button I need, then clicking the button. I'm currently running it via an Applescript that is run by a cron job. This works as long as the screen saver is not active. Could the screen saver be hosing Quickeys timer, too? One last question then I'll accept the answer and award the points: Is Quickeys language documented anywhere?

Thanks for your efforts!
0
 
LVL 5

Accepted Solution

by:
Insolence earned 500 total points
ID: 9902346
The screensaver actually does hose the timer for me.  =\  Yikes, never noticed that.  I usually let my monitor go to sleep and don't use screensavers so I never ran into that.  =P  And I don't think it's documented anywhere really.  It might be... but I've never seen it.  It seems decent enough to read it and figure out what most of it does though, but you're right, language documentation couldn't hurt.

 - Insolence
0
 
LVL 5

Expert Comment

by:Insolence
ID: 9903655
And you are quite welcome mwarbeck.  =)

 - I
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
Create a default user profile for Mac OS X 10.7/10.8 Create a user account on OS X that will be a template for every other user of that computer. I usually call it “profile” and make it an administrator account for the time being. 1. Install a…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now