FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

A little help with writing a script

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
olamsined
Newbie


Joined: 21 Mar 2006
Posts: 3

PostPosted: Tue Mar 21, 2006 1:28 am    Post subject: A little help with writing a script Reply with quote

Hi,

I find this software splendid, and so I'm writing scripts for it.

Here's my question:

Is there a way to see if we are currently connected to the phone?
Using SCHelper maybe? I've been hunting scripts all over for samples I might use. The only way I've found so far is to set a flag in the registry during the Connect/Disconnect script. Surely there must be a simpler, and more elegant, way than that.

Anyway thanks again for a fantastic tool/utilty.
Denis Malo
denis_malo@sympatico.ca
Back to top
View user's profile Send private message Send e-mail
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue Mar 21, 2006 11:56 am    Post subject: Reply with quote

Hi Denis,

Thanks! I'd like to know approximately what you want to do.

It is currently not possible from the *outside* to check if the software is connected to the phone (except by looking in the registry).

From a script that is executed within Salling Clicker, however, this information is available.

Still, I think I need to understand your needs a bit better to give good advice.

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
olamsined
Newbie


Joined: 21 Mar 2006
Posts: 3

PostPosted: Tue Mar 21, 2006 1:31 pm    Post subject: More background info Reply with quote

Hi,
thanks for the quick reply.

Inside a Sailing Clicker script, one I will start via the menu, I want to start monitoring time until a specific time is reached, in my case 8am, at which point I will send, or not, one of two emails, depending on the state of the connection with the phone and my vpn connection with the office.

In one case an email saying I will be working from home if my vpn is active, in the other, if my vpn isn't active, an email saying that I am sick today and can be reached at home, . Everything in this script is working fine, however as I said I would like to be able to tell if the phone is currently connected, if it isn't then I'm off to work and shouldn't be sending any emails at all.

Of course these emails are being sent to my own account at the moment, but they will be very usefull in automating an administrative task I always forget, which is to inform my boss and receptionist when I'm working from home, leaving them in the dark is apparently very disturbing to them, or so I've been told, repeatedly, hehe.

Thanks for the help.
Denis Malo
Back to top
View user's profile Send private message Send e-mail
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue Mar 21, 2006 3:03 pm    Post subject: Reply with quote

(Note: I've moved this thread into the "Scripting" area of the forums)

Denis,

This script won't be running inside Clicker, right? I'm asking, because you cannot leave a script running continously inside Clicker for long periods of time; it'd "freeze" the phone-side client.

What you need to do (and possibly, this is what you have done), is make an external application/scriptlet doing the actual waiting. You could launch this application asynchronously (or send it a message) from the "clicker script", if you want to invoke the function remotely from within Clicker.

Such being the recommended way to implement this sort of stuff, you'll need to read the registry key to figure out if you're connected or not. For now, at least. I expect to add more features allowing external comminication with the Clicker process in the future.

I hope this helps a bit! Let me know if you need more advice.

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
olamsined
Newbie


Joined: 21 Mar 2006
Posts: 3

PostPosted: Tue Mar 21, 2006 5:36 pm    Post subject: Reply with quote

Hi again,

what I would like to know is which key in the registry am I supposed to look for to see if I'm connected or not.

My script will run off of XP's scheduler, not inside Sailing Clicker per say, I just invoke CScript and my script, is there a registry entry that lets me know if the phone is connected or not? As it stands I've made my own using the proximity events, but is there something that already exists something that is set by Sailing clicker not by one of the scripts? The reason I ask is if it does then my little JScript would be completely phone iindependent. So long as the phone is connected, regardless of weather I have enabled correct script or not, it would still work.

Looking forward to your new libraries. Here's another question, is there a primer on using TheTerminal somewhere that I missed, it sure would come in handy as I get more and more into your application. I'd like to unlock my front door, open the garage door, etc, really are no limits when you get into it. Also I'd like to make a screen that displays on the terminal the current status of downloading files, so again understanding how the terminal works would be a great help.

Thanks again for all your help and time. If there's no response to this post I'll know there aren't preset registry entries, or a TheTerminal Primer.

Have a great day.
Denis Malo
Back to top
View user's profile Send private message Send e-mail
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Thu Mar 23, 2006 11:56 pm    Post subject: Reply with quote

Hi,

Sorry for the delay. I thought there was going to be a registry hack you could use. After research, though, it appears this approach is not possible. :-(

So, you'll need to go ahead with the phone event script approach you started with. I don't really see how it'd be hard to make it phone independent (it'll work on all phones supporting Phone Events); making sure the script is enabled, however, is of course a requirement.

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group